acer

32348 Reputation

29 Badges

19 years, 330 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

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?

Please post your followup example(s) on this topic as a comment here (or on one of your other question threads on this topic), rather than start a new thread.

@Carl Love Access to documents (when online) is not what I meant. That is highly desirable.

But consider:

  • having a full Maple computational kernel, locally
  • having full Maple interface features (manual rotation and full interoperability with plots, popup menus, etc)
  • animations computed, stored, and displayed from structures held locally -- no delays while a mere image format is squeezed down an internet connection
  • the ability to work when offline

and so on. That's what I want on my smartphone, tablet, and chromebook.

A browser based interface is not intrinsically poor. But for dynamic computation and visualization it can be so much better if it has the means/functionality/choice to switch seamlessly to a full local computational kernel.

@ecterrab I am sure you are misunderstanding my points entirely.

I am talking about the number of all the ARM chromebooks and ARM smartphones in this world, and you are talking about the number of all the Raspberry Pis.

I did not state that Maple on the R.Pi was of little interest, or anything like that. But it's value could easily be dwarfed by the impact of full ARM port on other devices with that chipset.

@Regnar Andersen No, it's not enough to support the operating system. The executables also need to be compiled with the ARM CPU as target. That might well involve considerable effort.

Anyway... I'd be far more interested in Maple's kernel on ARM chromebooks and phones than I would be about it on the Pi.

(I'm also waiting for the world's infatuation with thin clients and the cloud to end.)

@David Sycamore He means that if you made the retro-edit for the ++ syntax, and if you also actually include and execute the code for procedure PP, then his P and PPrime procedures produce that output in Maple 2017.

If you forget to include and execute the code for PP then PPrime will not return false as desired, and all you'll get from P(50) are the primes from to 2 to 47.

restart;

kernelopts(version);

`Maple 2017.2, X86 64 LINUX, Jul 19 2017, Build ID 1247392`

PP:=proc(n::posint, kmin::posint, L::list(prime), nSolMax::posint)
# Prime partitions with elements >= kmin, starting with L
local Sol:=table(), nSol:=0, E;

E:=proc(L)
local p,sL:=add(L);
if L<>[] then p:=L[-1] else p:=nextprime(kmin-1) fi;
while p+sL<=n and nSol<=nSolMax do
  if p+sL=n and nSol<nSolMax then nSol:=nSol+1; Sol[nSol]:=[L[],p] fi;
  if nSol>=nSolMax then return fi;  
  E([L[],p]);
  p:=nextprime(p);
od;
end:

if L<>[] and add(L)=n then nSol:=nSol+1; Sol[nSol]:=L fi;   
E(L);
entries(Sol,nolist);
end:

SingPrime:=proc(p::prime,n::posint)  
# there exist only 1 PP starting with p
evalb(nops([PP(n,p,[p],2)])=1)
end:

Q := proc(n)    # list of SingPrime's
local p, P:=select(isprime, [seq(1..n)]);
select(SingPrime, P, n)
end:

PPrime:=proc(p::prime,n::posint)  
evalb(nops([PP(n,p,[p],1)])=1)
end:

P := proc(n)
local p, P:=select(isprime, [seq(1..n)]);
select(PPrime, P, n)
end:

P(50);

[2, 3, 5, 7, 11, 13, 19]

 

Download vv_PP.mw

 

First 189 190 191 192 193 194 195 Last Page 191 of 592