Nasos

84 Reputation

2 Badges

16 years, 84 days

MaplePrimes Activity


These are answers submitted by Nasos

Thank u all so much for your suggestions.

Robert, for A(t) i would expect a double exponential : A = a*exp(-t/b)+c*exp(1/(t+d)) and   for B(Y) maybe : B=f*exp(-g*Y)+k

Ive tried to fit the data similarily the way u showed me but i must be doing something wrong. 1)  Could u please help me with that? in your example are the numebrs for d,e,f,g random values?

I have worked out these equations in the past but im not sure how they compare with wht u suggest if they are of any help:

For A=1.027*exp(-t/(.282))+0.051*exp(1/(t+1.766*10^90))   [1]

and B=2.433*10^3*exp(-0.008*Y)+780  [2]       but still my results are a bit off from wht they should be.

2) For A(t) i have almost 100 points in an excel file. Is there a simple way to enter this data in maple or do I have to type them in the Adata/Tdata format as above?

3) If u plot yf as shown below ( X axis log) for t=0.038 there is a small discontinouity. It happens even if i substitute [1], [2] in   Y=A(t) *B(Y) but only in maple. Any ideas why?

> with(Optimization); Tdata := [0.5e-1, .1, .2, .5, 1, 2, 5, 10]; Adata := [.9, .75, .6, .2, 0.8e-1, 0.6e-1, 0.51e-1, 0.5e-1]; TAdata := zip(`[]`, Tdata, Adata); Ydata := [25, 50, 75, 100, 125, 150, 175, 200, 225, 400, 500, 700, 1000]; Bdata := [3250, 2500, 2000, 1725, 1550, 1400, 1325, 1275, 1225, 950, 850, 775, 775]; YBdata := zip(`[]`, Ydata, Bdata);
> LSSolve([seq(a*exp(-b*t[1])+c-t[2], t = TAdata)], a = 0 .. 2, b = 0 .. 10, c = 0 .. 0.05); abcsol := %[2];
> LSSolve([seq(d*t[1]^e+f*t[1]^g-t[2], t = YBdata)], initialpoint = [d = 61875, e = -1, f = 775, g = 0]); defgsol := %[2];
Warning, limiting number of iterations reached
>
> yf := proc (t) options operator, arrow; fsolve(eval(y = (a*exp(-b*t)+c)*(d*y^e+e*y^f), {op(abcsol), op(defgsol)}), y = 0 .. 1000) end proc;
> yf(1);
127.3895493
> plot(yf, 0.01 .. 10, axis[1] = [mode = log], labels = [t, y]);
 

Thanks in advance for your time.

Im sorry for the confusion.I ll try expalin better.

 This is the initial equation :V=I(t) * Z (V)   (1)    where:

I(t)=(1.027*exp(-t/0.282)+0.051*exp(1/t+(1.766*10^90))))   (2)  and

Z(V)=(2.433*10^3*exp(-0.008*V)+780)    (3)

I produced equations (2) and (3) by curve fitting to the original data. The question is if  I can use my original data  to solve (1) instead of using the equations (2) and (3). Maybe  create matrices that can be entered in (1). im not sure if something like this  is possible.

I was hoping that  in this way i would avoid any deviation from the original data that may be caused by equations 2, 3 and acquire better precision.

Thnx

Thank you so much for your advice and honestly no offence taken at all. Indeed the book you ve recommended is very clear of how the parameters of the distribution work and i believe I got it right. However,I would like to focus on ploting all these pdfs or cdfs on a 3D plot where each lets say cdf, corresponds to a time as I described before.So far Ive tried using the transform((x, y) command.Below I show how I have worked out for 4 cdfs corresponding to 10,20,30 and 40 ms.(I have a thousand of different distributions up to 10 secs). with(stats): > C001:=plot(statevalf[cdf,lognormal[0.3792,0.9556]], 0..4, colour=green): > C002:=plot(statevalf[cdf,lognormal[0.3525,0.9214]], 0..4, colour=green): > C003:=plot(statevalf[cdf,lognormal[0.3257,0.889]], 0..4, colour=green): > C004:=plot(statevalf[cdf,lognormal[0.2990,0.8580]], 0..4, colour=green): > f(0.01) := plottools:-transform((x, y) -> [x, y, 0.01]): > f(0.02) := plottools:-transform((x, y) -> [x, y, 0.02]): > f(0.03) := plottools:-transform((x, y) -> [x, y, 0.03]): > f(0.04) := plottools:-transform((x, y) -> [x, y, 0.04]): plots[display](f(0.01)(C001),f(0.02)(C002),f(0.03)(C003),f(0.04)(C004),axes=boxed,labels = ["Parameter X","Probability","Duration,s"]); Q1:Is there another way, more appropriate to plot the cdfs on 3D axes including time as i have above? Q2:Is there away these curves to form a surface? (It would be ideal if i could change the color of the surface according to the probability) Q3:Is there finally a way to interact with that surface in a way where i input X and Y to get Z back.For 2D plots there is a point prob but not somethin similar for 3D.Perhaps could I make a maplet where I input 2 variable to get the 3rd one back? Any hints or suggestions which could help will be highly appreciated. Thanks Nasos
Dear J Tarr, It has been some time since I gave my last piece of homework although it wouldnt have been bad if i was back at school. To be honest my question is a bit more complex than that but im quite new with maple so im taking it a step at a time. What I have is a parameter X=f(t) with t ranging from 0..1 sec. For every 10 ms,there is a different lognormal pdf that describes X. From each of these lognomal distributions I only have three points of X corresponding to 5%, 50% and 95% probability and perhaps a minimum value. My first step is to define for each t(t1=10ms, t2=20ms.... t100=10 s)the equation that defines the corresponding distribution. My aim is then to plot all the distributions for all t1,t2...t100, and create a 3D surface that will have in the axis probability, time and of course x. Or perhaps if we could generate an equation to describe that surface that would be even better. So far using software (@Risk)i have the mean and standard deviation of all the hundred distributions but when i apply to maple using lognormal(mu,sigma) and PDF(x,u)and CDF(x,u) commands,i dont seem to get what i expected.Thats why i was asking to crosscheck at least if the values of mean and std deviation for each distribution, i was taking from @Risk were correct. Any advice or suggestions would be more than welcomed and thanks again for your time. Regards, Nasos
Thank u so much for your help
Dear Doug, Thnx a lot for your help.Really appreciate Nasos
thanks alot Nasos
Alec, Thank you so much! One more thing if u dont mind. When calculating the lower equation z cannot be less than and z= h= 0.25. Can the optimization command that u used for the upper equation apply here? The other two equations I want to project are: Itouch := 474335.0379*h*(10300.*2.718281828^(-3.703703704*ts)+1030.* 2.718281828^(-3.703703704*ts)*h+490.*2.718281828^(1/(5.*ts+6.))+49.* 2.718281828^(1/(5.*ts+6.))*h)/(51200.*sqrt(ln(100.*h))*h+5120.*sqrt(ln(100.*h)) *h^2+25600.+12790.*h+511.*h^2) and Itouchi := 0.2205799098e13*h*(182.*2.718281828^(-4.081632653*ts)+15.* 2.718281828^(2.500000000/(10.*ts+3.)))/(5000000000.*ln(100.*h)*h+5000000000.+1950427827.*h) Can I apply the same here for finding upper and lower side equations? Thanks again for your help Nasos
Page 1 of 1