Thomas Richard

Mr. Thomas Richard

3255 Reputation

13 Badges

15 years, 96 days
Maplesoft Europe GmbH
Technical professional in industry or government
Aachen, North Rhine-Westphalia, Germany

MaplePrimes Activity


These are answers submitted by Thomas Richard

Since the comments are in German, and I know the author of the book behind that code, I suggest that you get in contact with me by e-mail to trichard@maplesoft.com. If you have a current Maple version, we may be able to help you in terms of technical support.

The invalid characters are probably some side effect of copying&pasting from the Springer PDF file.

By the way, "Zeigergröße" means size of pointer, or (in this context) length of arrow - i.e. mathematically speaking: norm of vector.

I don't have a Mac here, but I was told that Retinizer will help if you select some text for it to change to HiDPI mode.

Can't promise anything, but I would guess native support for those displays is under development.

About question 1: Your worksheet is apparently configured to use extended typesetting level. To change that to standard mode, there are two ways: programmatically and interactively:

interface(typesetting=standard);   # note that the interface command returns the previous setting

or use the "Tools > Options > Display > Typesetting level" menu.

I'm not sure about question 2, though. What exactly would you like to see? Do you mean this:

Vector(3,Diff(U,t));

Carl's hint on printf is certainly the best "programmatic" one. If you want an interactive approach, try the context menu (right-click on the output) and select Numeric Formatting.

You can also convert the original result to polylog and then call simplify or combine or evalc.

This method works for many (but not all) dilog expressions.

@nm Maple can do the same if needed. Check:

NumericStatus(invalid_operation);
0^0;
NumericStatus(invalid_operation);

And then define your own NumericEventHandler, as seen in the associated help pages. Let it emit your preferred warning or error message.

A symbolic solution for your input can be found as follows:

X:=Matrix(2,2,symbol='x');
LyEqn:=A.X+X.A^%T=-B.B^%T;
ls:=lhs(LyEqn); rs:=rhs(LyEqn);
eqsys:=map(op,[entries(ls=~rs)]);
vars:=map(op,[entries(X)]);
sol:=simplify(solve(eqsys,vars));

Probably not yet the most elegant way...

Edit: better use Equate here:

eqsys:=Equate(lhs(LyEqn),rhs(LyEqn));

Some hints:

When defining psi as a (Matrix-valued) function of x, use
psi := x -> Matrix(1,3,[x,x-1,x^2-x-1]);   # no need to put the exponent 2 in parentheses

U := Matrix(3,3,symbol='a');   # much shorter input

If you mean the transpose operation by ^T, that should be ^%T instead. Please see ?Transpose.

The usual Matrix / Vector multiplication uses . (the dot), whereas * denotes scalar multiplication.
A demo worksheet can be found by entering ?examples,LA_Syntax_Shortcuts. The ?LinearAlgebra,Multiply page may also be helpful.

Finally, I think there are dimension mismatches between some of your Vectors and Matrices in u. But you should be able to fix that after applying the above hints.

I see no problems with

convert(AiryAi(x),Sum);
convert(AiryAi(x),FPS);
taylor(AiryAi(x),x);
taylor(AiryAi(x),x,10);

Likeweise for AiryBi.

No, there is no such limit built into the product. I've successfully run models with more than 10000 equations, and others have run even more. For memory-intensive models, we recommend using a 64-bit platform.

The error message is probably indicating some modeling error. First, I would set the verbosity level of the MapleSim console to Verbose or even to Debug, because additional diagnostic messages might help pinpointing the problem. You could try to export the system of equations to Maple, using the Equations template, which may give further insight. If the problem persists, contact our (or your reseller's) support team. Attach your msim file and specify your version. We have recently launched version 7, by the way.

Of course, you can also upload your msim file here in MaplePrimes, but I'm afraid nobody will spend much time with such a large model. ;-)

I'm not an Excel expert, but it seems your xlsx file contains 20 rows and 3 columns, of which some are empty and implicitly filled with 0. Proof:

currentdir("C://Users//trichard//Documents//MaplePrimes"); # adapt to your own current directory
with(ExcelTools);
data:=Import("damperTR.xlsx");
interface(rtablesize=20);
data;

This would at least explain MapleSim's first error message.
The lookup table name containing "−" also looks weird, but is apparently not an issue for MapleSim.

Since fsolve returned a set of equations, you can either access the right hand side of each, using

evalf(sin(rhs(dd[1])));

etc., or - if you want to do more work with x[1] etc. later on - just assign the solutions:

assign(dd);

Note that this command emits nothing, but turns the equations into assignments, so that you can then simply enter

sin(x[1]);

To obtain exact solutions, use solve rather than fsolve, by the way. For larger systems of linear equations, I would use LinearSolve from the LinearAlgebra package instead, both for numeric and exact solutions.

I would start with ExportMatrix and ImportMatrix. If you really need to work with Arrays (as opposed to Matrices), then conversion is easy:

restart:
currentdir(kernelopts(homedir));
A := Array([[2,3],[5,7]]);
whattype(A);
M := Matrix(A); # or M := convert(A,Matrix);
ExportMatrix("eintest.txt",M);

restart:
M := ImportMatrix("eintest.txt");
whattype(M);
A := Array(M); # or A := convert(M,Array);
whattype(A);

If this doesn't work for you, please explain why not. Note that Maple 18 introduced many newly supported formats here, just in case you need to open those files in other applications as well.

ode := diff(y(x),x)=2*x*y(x);
Order := 8: # optional
sol := dsolve(ode,y(x),'series');
odetest(sol,ode,'series');

Please see ?dsolve,series for more help.

Not in a single shortcut, but it's possible as follows:

Ctrl+A, then Alt-E-E-S (at least on Windows and Linux; for Mac please look up the keyboard tables).

First 25 26 27 28 29 30 31 Last Page 27 of 43