Items tagged with parameter parameter Tagged Items Feed

I am considering to write a wrapper for plot and related commands (could redefine the commands or introduce a new name) which facilitates export of Maple plots to postscript. The command should interpret some of the options and remove them from the options sequence before submitting the remaining ones to the original plot().
E.g. it should recognize a title="TITLE" parameter and process TITLE (e.g. write it to a specific file). Similarly I would want to be able to pass additional parameters, e.g. filename="FILE" in order to specify how the output file name should be set. Is this a sensible approach. How can I realize this detailed option 'parsing' in Maple?

Hi, those who are in mapleprimes.

 

i have a problem in solving inequality with symbolic notated parameters.

I wrote the following code to solve for n(SPH), but couldn't obtain any result but an error message.

solve(-s*(-n(SPF)*tau+n(SPH))/(tau-1) <= n(SPH),n(SPH)) assuming (tau<1,s>0,s<1,tau>0);

 

The error was

Error, (in assuming) when calling 'unknown'. Received: 'invalid input: Utilities:-SetSolutions expects its 2nd argument, solutions, to be of type ({list, set})({piecewise, ({list, set})({name, relation})}), but received [s = -tau~+1, [SPF = SPF, s = s, tau~ <= 0]]'

 

Please tell me how I should do to solve the inequality.

 

Thanks in advance.

 

taro

 

Dear Maple Users,

I'm beginner in Maple.

I have this system of Pde:

with lambda experimental parameter and n,c,v dependent variables. I write this on Maple but I read on internet that the solution "float(undefined)" is an error.

I will insert this initial condition: c(x,0)=0,n(x,0)=0.4

Thanks everybody

I have a differential equation system x'(t)=f1(k,t)*x(t)+f2(k,t)*y(t), x'(t)=g1(k,t)*x(t)+g2(k,t)*y(t) with initial condition x(0)=1 and y(0)=1. Here k is a parameter, f1, f2,g1, g2 are certain functions of k and t. I used dsolve and set k to be a parameter to solve the system numerically which gives you a procedure output. If I fixed k to be a specific numerical number, then I can use odeplot to plot x(t) VS t.

Now I set a range for k, say k=0..10. And I want to plot x VS (t,k) which is a 3D graph. How can I do this?

Hello, 

So I have two simultaneous equations, 

T= n1/(1+|T-S|) and S=n2/(n3+|T-S|) 

Where n1, n2 and n3 are constant parameters (from here on I fix n1=1 and n3=0.3). So I want to plot T, S against n2 for different values of n2. 

If I also fix n2 (say, n2=1.5) I  can get values for T and S no problem. 

But I've no idea (after many hours of searching) how to progresss. I know I need the program to put various values of n2 into the two equations and then plot the solutions numerically but I'm unsure what to try next.

Could anyone please shed some light on this?!

Thanks!

Hi MaplePrimers!

I have a simulation in MapleSIM, exported as a compiled procedure in maple using -LinkModel(), and -GetCompiledProc.

I'm trying to do parameter estimation on my MapleSIM model.  Within a optimization scheme, I call the MapleSIM model, and it will output a curve.  Using a least squares method, I compare this measurements to synthetic experimental data (I know the actual values), and generate an objective function.  The optimization algorithm will try different parameter values, and try to minimze the objective function.  When the curves are exactly the same, the objective function will be zero.

The problem I am having is certain parameter sets will cause the model to require very small steps.  I wish to put a timeout on these experiments, because speed is important.  However, I would also like to see the results up to the point of requiring very small steps.  For timeout, I was using code along the lines of:

out:= timelimit(30,cProc(params = PData)); #simulate with 30s limit

where PData are the parameter guessses, and cProc is the compiled MapleSim model.

I would like 'out' to be assigned whatever the results were after 30 seconds, even if the model had not finished integrating.

 

Thanks in advance for any help!

Hi everyone.

i want to undestand how to use the passing by reference in Maple i do this:

generate_x := proc (x)

    x := (rand(1 .. 10))()

end proc;

generate_y := proc (y)

    y := (rand(1 .. 5))();

    print(y)

end proc;

print_xy := proc ()

     local x, y;

     generate_x(x);

     print(x);

     generate_y(y) end proc;

print_xy();

#print(x)  works but generate_y(y) doesn't print the value of y.

Can you help me to understand WHY i dont get the print of y.

Thanks and happy christmas to you!

Hello experts..

The following is the IVP:

restart:Digits:=14:t0:=0.0:tN:=5000.0: N1:=5000;th:=evalf((tN-t0)/N1):

dsys1 :=diff(y(t),t)=y(t)*((1-y(t)/3-epsilon)-0.8*y(t)/(y(t)^2+0.5^2));

var:={y(t)}:ini1:=y(0)=0.5:

dsol1 :=dsolve({dsys1,ini1},var,numeric, output=listprocedure, abserr=1e-9, relerr=1e-8,range=0..1);

dsolu:=subs(dsol1,y(t)):

t1:=array(0..N1,[]):u1:=array(0..N1,[]):pt1:=array(0..N1,[]):

for i from 0 to N1 do t1[i]:=evalf(th*i):u1[i]:=evalf(dsolu(t1[i]));pt1[i]:=[t1[i],u1[i]]:

od:

mytab1:=eval([seq(pt1[i],i=0..N1)]):

the above code is to plot y(t) against the time t for fixed epsilon

Now the question is how to plot epsilon against the time???

I do appriciated any comments

 

 

I have a statistics task that is very complicated to me, and I would really appretiate some help!

I believe that I have completed task a, but task b and c seems to be too hard for me to grasp.

Here is a presentation of the task text:

 

xi 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
yi 12.3 12.8 16.8 17.9 20.5 22.7 24.9 27.5 26.9 29.4 30.3 34.2 36.4 36.7 41.1

Assume that the data represents independent realizations of a "linearlnormal" model.

Yi = α + β xi + ei i = 1..15,

where ei˜N(0,σ), where sigma is unknown.

 

(a) create a scatterplot of the data {f(xi,yi)}15 ; i=1
Then calculate the empiric correlation coefficient.

(b) Find the minimum least square estimate for α & β.

(c) Create a 95% confidence interval for the parameter β. What does this confidence interval express?

Is there anyone out there who are able to help me with some maplecode?


thanks in advance,

Soeta

Here's a Maple trivia question: There is a Maple symbol that cannot be used as a procedure parameter. As far as I can tell it is the only one. What is it?

Hello,

 

I have two sets of data representing two function that depends on x with a parameter A.

I need to do a fit on both data series at the same time so to fit with the best parameter A.

 

Here is how I do a fit on one function

 

> f(x):=A*cos(x-B)^(2);               
> g(x):=A*(cos(x-C)^(2)+ sin(x-C)^(2))^2; 
> fit1 := Fit(f(x), r, x, parameternames = [A, B, C...

I have a model with 3 parameter blocks containing a lot of constants. I would like to know how can i print those lists to papper, .pdf, word or something like that.

Thanks

Hi,

I am trying to solve the following system using the function "solve", but the message "warning solutions may have been lost" appears.

 

This is my script (a,b,c,d,e,f, Resp, Malcyt,Pyrcyt are parameters). The unknown variables are Citcyt, Citmt,Malmt,Pyrmt:

e1 := 0 = a.Pyrcyt-a.Pyrmt+(b-c).Malmt;
e2 := 0 = d.Malcyt+e.Citmt-(d+b+c).Malmt;
e3 := 0 = f.Citcyt+c.Malmt-(e+f).Citmt;
 e4 := 0 = 2.*e.Citmt+(b+c).Malmt-Resp;

Hi all,

I read the help on using parameters, then I tried to modify the example


f := proc(a, b, c)

    if _params['b','c'] = NULL then
    a
    elif _params['c'] = NULL then
    a + b
    else
    a + b + c

    end if

end proc:

I can't really spot where it went wrong, but it just wouldnt execute as I would expect...

 

Hey guys..

I need some help on determining the correlation coefficient between my data points for an Influenza epidemic and the SIR model, with my estimated parameters Beta and Alpha. The initial conditions for the equations are defined at the beginning of my worksheet:

SIR_model.mw

Hope someone can help me ;)

 

 

 

1 2 3 4 5 Page 1 of 5