acer

32480 Reputation

29 Badges

20 years, 6 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love There is a Typesetting:-EV, designed for use immediately within a call to Typesetting:-Typeset which has special evaluation rules.

But I don't see that being necessary here. The OP's claimed issue is odd. I wish people were more helpful by simply uploading worksheets that exhibited a problem, rather than merely describing it vaguely.

Perhaps you have used a plain `=` instead of `:=` ?

The former creates an equation, while the latter does an assignment. Perhaps you are trying to assign the earlier Matrix result to some name, but have accidentally only made an equation?

@jum Resorting to optimization due to (likely unnecessary) loss of precision and introduced inconsistency is an inferior numerical approach, as I mentioned previously. It seems that the numerical inaccuracy of your final results here might be acceptable to you. I wonder whether that would remain true for other examples.

@jum Why are you applying evalf when forming the equations?

Do you realize that can incur roundoff error and loss of precision, possibly resulting in a consistent exact system becoming (unnecessarily) an inconsistent floating-point system?

You can try constrained optimization (instead of rootfinding) of an ostensibly inconsistent floating-point system. But it's usually much better to work with a consistent exact (or non-prematurely-truncated float) system if possible.

The problem is not "just" as you gave it. The more details you supply the better chance someone else can figure out the problem.

Why don't you give us the full details, including the background problem and the full code that produces your equations?

That might avoid a back and forth guessing game.

It looks as if you are somehow substituting in a numeric value for x (which you say is supposed to be the dummy variable of integration).

Why don't you upload and attach a complete worksheet (and data values), in a Comment. You can use the green up-arrow in the Mapleprimes editor to do that.

@wswain 

You wrote, "I assumed the eigenvector returned the matrix of vectors, but not the values as they are two unique commands."

The LinearAlgebra:-Eigenvectors command returns both eigenvalues and eigenvectors, as I mentioned above.

You wrote, "When you say MTM is part of the regular package do you mean loaded using with(MTM) call.   As to getting an external toolbox?"

MTM is a regular Library package, and it can be loaded (ie. its exports rebound) by calling with(MTM). Or you could call its exports with their full name, eg, MTM:-eig(...). That kind of usage is not what is meant by "an external toolbox", which means quite another thing.

Youi wrote, "I still ask is there any benefit to the MTM functions over Maple?   Or, Maple direct is better as not trying to replicate Matlab? "

The MTM package was originally written as part of a mechanism to support Maple-Matlab interoperability (which includes the Maple toolbox for Matlab). But it is also a way of emulating some key Matlab commands' syntax from within Maple. I side with the view that Tom Leslie has expressed: when operating within Maple what is the point of using a thin veneer (to emulate a only subset of Matlab) instead of learning Maple syntax and usage more thoroughly, directly, and consistently?

 

@mehran rajabi Do you want it to look for just one solution, or n solutions, or all solutions?

Do you want an exact solution, or a floating-point solution?

If you have examples with larger systems then why haven't you provided all of them here, explicitly?

Why don't you bother to state precisely what you want here?!

And why do you need to avoid the use of fsolve? Is it homework, and you are supposed to implement numeric rootfing from scratch?

Why haven't you explained these details?

@ashley2 

Either call it as plots:-display(...) instead of as just display(...).

Or put with(plots): up at the top of the sheet, but after any restart.

Perhaps this would be a good time to start reading some documentation?

@goli You can try.

If you look closer you can see that had already applied simplify(simplify(...),size) to the generic result for solving the characteristic polynomial of J8 in terms of radicals. That reduced the combined length of all three (from 40386) down to 9459. That could be improved somewhat, under assuming l::real.

(In Maple 15 the straight call simplify(...) doesn't also call simplify(...,size), which is why I did both. In modern Maple versions the former also does the latter.)

You might have to wait, if trying also with radnormal or evalc, etc. I don't know whether you would prefer results for the three roots in terms of trig calls.

@goli Your claim is not true. I used a specific value l=2 only to do a brief check and comparison. (I showed two paths, one using Eigenvalues(J8,implicit) to compute EV8, and another solving the characteristic polynomial of J8 explictly which produces result in terms of radicals.)

But the results assigned to TT8 (or EV8) have generic indeterminate l within them.

From where did you get these RootOf expressions? Please provide full details.

 

In my answer to your previous question I showed how you can add a point-plot.

@Mac Dude A .mla file is not a package! It is a container that can store Maple things, such as expressions, tables, procedures, and... modules. The letters stand for Maple Library Archive.

A module may have `option package`, in which case its exports can be rebound using the with command. But that is not really relevant to what you're trying to do with Records.

A Record is implemented as a special kind of module. An object is implemented as another special kind of module.

A module cannot generally be stored within just a single .m file, as that "dot m" format doesn't provide for storing more than just the shell of the module.

That is why module based packages (eg. LinearAlgebra, Statistics, etc) are stored in .mla Library archives. (The .mla contains many things, each respectively in its own .m representation. The module shell in one, and its exports and locals in others individually.)

So, I was thinking that (possibly if all the entries have been referenced as some point in the session) a Record might be stored in full within a .mla file. There may be difficulties (related to those with deep copying), if the Record contains other Records.

If something is stored within a .mla (using LibraryTools:-Save) then it can be accessed simply by referencing its name, given that the .mla is in libname.

A single .mla file can be used to store multiple things. You can utilize it to store many different procedures, modules, expressions, etc.

But since its stored contents are accessible by name as soon as the .mla is in libname then the burden of managing the global name-space rests on you. If you have many such Records then you may wish to keep them within some parent named data-structure, since storing them each by name can clutter your name-space.

Have you tried using LibraryTools to store it in a .mla Library archive?

First 191 192 193 194 195 196 197 Last Page 193 of 594