Thomas Richard

Mr. Thomas Richard

1828 Reputation

12 Badges

10 years, 69 days
Maplesoft Europe GmbH
Technical professional in industry or government
Aachen, Germany

MaplePrimes Activity


These are answers submitted by Thomas Richard

AFAIR, the menu item is for Classic worksheets which could be saved as XML (which was relevant many years ago, before .mw was introduced), and Classic exists for 32-bit Windows only (nowadays). But I don't have any such XML files to verify that guess.

So you have a .mw file that is recognized by Maple as an XML file? That sounds to me like a corrupted one. In that case, please see our FAQ at https://faq.maplesoft.com/hc/en-us/articles/360019491092-Can-I-repair-a-corrupted-Maple-document-worksheet-file-#

In a few cases (depending on the input equations and options), the following may provide the desired information:

infolevel[fsolve] := 2:

# two examples from the fsolve help page:

f := sin(x+y) - exp(x)*y = 0:
g := x^2 - y = 2:
fsolve( {f, g} );

fsolve( ln(v) = v^2 );

Since the infolevel setting does not cover all cases, it has been left undocumented for fsolve.

... so it's easy to handle (even in exact arithmetic if wanted):

with(LinearAlgebra):
sys := [u[0,0],u[0,1],u[0,2]]:
vars := indets(sys,'name');
A,b := GenerateMatrix(sys,vars);
SOL[0] := LinearSolve(A,b);

 

You loaded the modern Statistics package, but then called the random[empirical] command from the outdated stats package. If you load stats instead, your worksheet wil run, but much better would be to rewrite it w.r.t. Statistics. Please see ?EmpiricalDistribution for a start.

BTW: there is also a WienerProcess command in the Finance package.

My suggestion is to use

simplify(result) assuming n::posint;

instead.

Please provide some example calls of GlobalSolve that emit an error message so that we can reproduce the issue.

If you're runing Maple 2018, your GOT version should be 2018 as well - otherwise you cannot install it properly.
You can enter version() to see a list of all Maple components and add-on products along with their build IDs (internal version numbers). GOT 2018 should have 1298750.

Independently of that, we recommend that you update Maple 2018.0 to the latest 2018.2.1; please see our list at https://www.maplesoft.com/support/downloads/index.aspx. Note that there is no such update for the GOT.

Upon entering our webstore at https://webstore.maplesoft.com/index.aspx, just set the Category to Student, and Location to your country (to see the correct currency). Then open the full list of student products. The 12-months term license is linked at the bottom. It's a bit cheaper than the default perpetual license.

Eligibility for the Student Edition will be checked in both cases.

If I interpret and transfer the example given on the help page correctly, it works like this:

p1 := contourplot([r,theta,psi], r = 0 .. 1, theta = 0 .. 3*Pi*(1/8), coords=cylindrical, contours=20);
p2 := contourplot([r,theta,phi], r = 0 .. 1, theta = 0 .. 3*Pi*(1/8), coords=cylindrical, contours=20);
display(p1,p2);

Is that what you need?

BTW: You don't need LinearAlgebra for this (unless your code snippet is just part of a longer worksheet).

I suppose you meant to write cos(t)^6, right? If so, then my suggestion is

combine(cos(t)^6,'trig');

You could even omit the 'trig' option, but I find it easier to read.

Alternatively, you could go the "manual" or stepwise way:

c6:=expand(cos(6*t));
c4:=expand(cos(4*t));
c2:=expand(cos(2*t));
c6+6*c4;
c6+6*c4+15*c2;
(c6+6*c4+15*c2+10)/32;

You can infer that simply from the 1st bullet item of the description: The FetchRow command returns value of all columns for the current row.

Furthermore, if we take a look at the output of showstat(FetchRow), there is no column parameter in the proc definition.

Please submit an SCR via MaplePrimes - thanks.

By entering the assignment operator := you have tried to assign the result of a Simulate call to A, but the correct way is to call the Simulate procedure of the module A that was created by calling LinkModel before. Note that :- is the so-called module member selection operator; see ?colondash or ?:- for help. Thus,

A:-Simulate();

will do the job.

BTW: your Excel file is contained in your msim file, hence no need to upload it separately to MaplePrimes.

Apart from that, let me point out that GetCompiledProc is much more efficient than Simulate (which is essentially equivalent to hitting F5 or pressing the blue triangle button in MapleSim). But that comes later, when delving deeper into the API.

The inequal function is not recognized (as part of the plots package) because the with command inside the proc is ineffective - which the startup code editor tells you. If you remove the with line, and call plots:-inequal rather than just inequal, the error will disappear. The with command is really made for interactive usage at the top level only, i.e. outside any procs or modules.

Furthermore, the "value" keyword should be enclosed in double quotes, which you did everywhere except for line 13.

The sum command implements far more advanced methods than simply adding each term. For a start, set

infolevel[sum]:=5:

before calling sum. I won't go into details, though.

Moreover, if you don't like the default behaviour of factorial(-1), you can modify it as follows:

restart:
NumericStatus( division_by_zero );
factorial(-1);
NumericStatus( division_by_zero );
MyHandler := proc(operator,operands,default_value)
   # MyHandler issues a warning, clears the status flag, and then
   # continues with the default value.
   WARNING("division by zero in %1 with argument(s) %2", operator, operands);
   NumericStatus( division_by_zero = false );
   return default_value;
end proc:
NumericEventHandler(division_by_zero=MyHandler);
factorial(-1);
NumericStatus( division_by_zero );

More details can be found under ?NumericEventHandler. Note that we're not modifying the factorial command as such!

It might be easily overlooked, but there is a short paragraph on that topic in the Description section of the ?assume help page:

Assumptions made on names can be removed by unassigning names. For example, having made assumption(s) on x, x := 'x' clears them.

The interface setting that nm is referring to just determines the way assumptions are displayed.

If you don't need the flexibility of ListDirectory, and want to save a few keystrokes, the older listdir command will suffice.

1 2 3 4 5 6 7 Last Page 3 of 32