dharr

Dr. David Harrington

8205 Reputation

22 Badges

20 years, 336 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

There is an example on the worksheet of examples referred to on the Explore help page. If I apply it to your example I get

restart;with(plots):

sys := { diff(x(t), t) = alpha*t, x(0)=0 };
sol := dsolve(sys,numeric, 'parameters'=[alpha],'output'='listprocedure'):
caller := proc(a) sol('parameters'=['alpha'=a]); sol end proc:
plotter:=proc(A) plots:-odeplot( caller(A), [t,x(t)], t = 0 .. 1,view=[0..1,0..1.5]) end proc:
Explore( plotter(a),'parameters'=[a=1..3]);

{diff(x(t), t) = alpha*t, x(0) = 0}

 


(plot doesn't show here)

Download ExploreODE.mw

As @tomleslie points out, this can be done in Maple with (F@@k)(z0). Note that (F@@0)(z0) returns z0 unlike your routine that returns NULL.

Change your last line to fsolve(ss) and you will get a solution.

You don't have an initial value for v1 or H0. And you need := not = after p0 and q0.

You generated a Matrix A with the RandomMatrix command, and then altered its entries in a loop. But for B, you never declared a Matrix (with, say the Matrix command) and so you ended  with a table by default. So just use B:=Matrix(3,3); before the loop.

You can see individual entries of a table such as W by giving the indexed form, say W[1]. To see the contents of the whole table use eval(W)

Works in Maple 2017.3, so maybe you should update your Maple 2017.

interface(version);

`Standard Worksheet Interface, Maple 2017.3, Windows 8.1, September 27 2017 Build ID 1265877`

solve(0.1 = 23.714*(-0.93205)^2/(20.3+61.4*.884^x), x);

-8.976314317

 


 

Download solve.mw

This is hard to diagnose without the worksheet, which you can upload with the big green up-arrow.

But the [1] in -1.*HFloat(0.0)[1]' suggests it is a problem with using subscripted variables like i[p](t). If you just want p to look nice as a subscript, use i__p(t) (double underline). Maple doesn't alway handle indexed variables i[p] the same as simple variables. If you change those, I think it will work, but will be easier to diagnose.

The immediate problem is that R:=Rser (which assigns Rser to R) should be R=Rser (which compares the two, in the context of an if statement). But also jthen should be then and notice that both R and Rser are locals that do not have values when you do the test in the if statement. For future reference, upload your worksheet using the big green up arrow to make it easier for others to diagnose your problems.

This must be a bug, since replacing color with fillcolor in your first example works. So M needn't have string entries. Can't think of a simple workaround any better than the one you have.

There is a student version of Maple, which is reasonably priced and has nearly every part of Maple that you likely need - see

https://www.maplesoft.com/products/maple/students/

But I don't think there is a free trial version. Check your institution doesn't have some sort of access to Maple for you.

You say you want database connectivity, but non-SQL, so I suppose you saw the Database package, which would let you interact with JDBC connected databases with SQLlite. Usually there is a client-server model with a database, and the server does the search through the database. If you don't want that, then you will need to read all the "database" data in to search it. Since you say it is too memory intensive to read it all in at once, then I think you are OK with reading it in record by record - that may be slow. You say you looked at fopen so are probably OK with that.

The description of your application suggests you only want to read from the database, not write to it. So if you want to stick with Excel, you will have to use the ExcelTools:-Import to import a range that is a row.  Or you could export your databaase to .csv, and then use fopen and readline or fscanf to read records. Maple has a Record data structure that allows naming fields and may be helpful if your data is structured.

If (in Maple 2017), I open the help page as a worksheet, all the examples run without error. The help page says "types of seasonal influence allowed (name, string, or set of these)", so you can use either A (a name) or "A" (a string). I don't know much about this package but it's often better to use a string since then you don't get into conflicts with variable names that you might have elsewhere in your Maple program.

If you just want to do it for export purposes, you can right-click and change style from polygon with outline to polygon. If you want to do it programmatically, you can add the option stylesheet=[vertexborder=false] to DrawGraph

or just use

b:=a^~2;

(edit: note a and b are really lists, not Vectors)

odeplot can plot many things, see the help page. In your case, you want:

plots[odeplot](sol, [x(t),y(t)],0 .. 10);

First 63 64 65 66 67 68 69 Last Page 65 of 81