Items tagged with parameter parameter Tagged Items Feed

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 ;)

 

 

 

Hi,

I'm running a 2D parameter sweep from Maple 15 on a MapleSim 5 model. The output is stored in a 2D matrix.  I've encountered two problems:

1) when I graph it with matrixplot the z-axis values are fine but I can't figure out how to change the x-axis and y-axis values from the matrix indices to the actual values of the swept parameters. 

2) When the parameter sweep begins I get a warning about storing the values in a matrix.  Maple...

I would like to know if it is possible to declare some variables in one parameter box (i would call it independ parameters) and other with parameters that depends on the first ones:

L=5

m=2

k=arctan(m/L)

 

(for exemple)

 

THanks

numeric_de.mw

hello boffins

if my de was soluble analytically, I would get an expression of time in terms of the other variables (V,theta,x) easily, but because it is only numerically solvable, i get an expression x(t)=proc(t)...,- the variables V and theta are mixed up in it-. Is there anyway they can appear?

I know I can put numerical values on V and Theta (and x) and solve for time (using parameters...

Hi all,

Is there a quicker way to find all unknows from an expression?

unknowns.mw

Say I want a list contains ALL parameters. In this case, it would return

[w1,w2,mu,tau[2],tan[3],tan[4],eta[1],eta[2]]


Is there a way to do this?

Thanks!

Casper

test.mw

Hi all,

Here is the problem, I will try my best to describe it:

 

Firstly of all,

 

log(p[j,c]/(1-p[j,c]))=mu+tau[j]+eta[c];

log(p[j,c]/(1-p[j,c]))=mu+tau[j]+eta[c]

In this system, the 'j' is a time varying parameter, and the...

restart:

with(LinearAlgebra):
with(ArrayTools):


k:=4;
pA:=<seq(p[a,i],i=2..(k+1))>;
pB:=<seq(p[b,i],i=2..(k+1))>;
pA+pB;

with(VectorCalculus):

pA:=<seq(p[a,i],i=2..(k+1))>;
pB:=<seq(p[b,i],i=2..(k+1))>;
pA+pB;

 

Hi all,

 

After I loaded the package with(VectorCalculus), the output of vectors changed to a different one.

Is there any real "difference" when...

1 2 3 4 5 Page 2 of 5