J4James

355 Reputation

12 Badges

12 years, 318 days

MaplePrimes Activity


These are replies submitted by J4James

@Carl Love my question was misleading, I have edited it.

sorry for the trouble.

@J4James 

NonlinearFit(model, <x_values>, <N_values>, d);

fsolve(%=0,d);

fsolve is not giving me any output beside that I was suppose to sub a single set of value [x,N] into

THE equation to get a value for d.  

@Carl Love 

restart:with(ExcelTools):

xyData := ExcelTools:-Import("D:/a.xls"):
L := convert(xyData, listlist);

x_values:= <L[1..-1,1]>:
N_values:= <L[1..-1,2]>:

alpha:=2*10^(-12):NB:=0.075:N0B:=0.2:t:=360000:

model := NN+N-(N0B-NB)*(erf((1/2)*x/(sqrt(t)*sqrt(d)))-sqrt(erf((1/2)*alpha/d)))/sqrt(erfc((1/2)*alpha/d))-NB

Statistics:-NonlinearFit(model,<x_values>,N_values,[x||(1..1)]);

Isn't, I suppose to get different output for d for each set of [x, N]? 

@Carl Love Its working fine now. Don't know what was the problem.

Sorry to bother you all.

@Carl Love 

Infact the original equation is

(N-NB)/(N0B-NB)=(erf((1/2)*x/(sqrt(t)*sqrt(d)))-sqrt(erf((1/2)*alpha/d)))/sqrt(erfc((1/2)*alpha/d))

So, I wrote it

NN:=-N+(N0B-NB)*(erf((1/2)*x/(sqrt(t)*sqrt(d)))-sqrt(erf((1/2)*alpha/d)))/sqrt(erfc((1/2)*alpha/d))+NB;

Cheers

 

 

@Carl Love 

p1:=plot([[F(0,0.8)(y),y,y=0..3],[F(0.1,0.8)(y),y,y=0..3],[F(0.2,0.8)(y),y,y=0..3]],adaptive= false):
dat:=plottools:-getdata~([p1]):
dm1:=op([1,-1],dat);

dm2:=op([2,-1],dat);

dm3:=op([3,-1],dat);

MM1:=<<dm1>|<dm2>|<dm3>>;

Error, (in Matrix) this entry is too tall or too short:

@PatrickT 

I am facing the same situation here, which is something like this

plot([[FPY(0,0.8)(y),y,y=0..3],[FPY(0.1,0.8)(y),y,y=0..2],[FPY(0.2,0.8)(y),y,y=0..1]],numpoints=25,color=[red,green,blue],view=[-0.3..0.5,0..2.5]);

Each line has different ending.

With the routine approaches, I get this 

1.#QNAN00000000000e+000,1.#QNAN00000000000e+000,1.#QNAN00000000000e+000

and also get the data in two columns but the data should be in 4 columns  

y FPY(0,0.8) FPY(0.1,0.8) FPY(0.2,0.8)

I tried to use ur approch but unable to give the path to the data file.

For example, I want to save it to C:/data/xyz.txt.

Need your response.

Thanks

 

 

 

@Carl Love 

Plus

S:=[1,2,3];

convert(S,Vector);

What are the values for m, beta and S?

@Carl Love 

x1_values:= < 0.1, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80,0.9,1.1,1.2,1.3,1.4,1.5,1.6 >:
x2_values:= < 1, 2, 3, 4, 5, 6, 7, 8 ,9,10,11,12,13,14,15>:
x3_values:= < 11, 12, 13, 14, 15, 16, 17, 18 ,19,20,21,22,23,24,25>:
x4_values:= < 10, 20, 30, 40, 50, 60, 70, 80 ,90,100,110,120,130,140,150>:
y_values:= < 30, 40, 60, 70, 90, 120, 150, 200,300,400,500,600,700,800,900>:
model:=
 a + b*x1 + c*x2 + d*x3 + e*x4 + f*x1^2 + g*x2^2 + h*x3^2 + i*x4^2 + j*x1*x2 +
 k*x1*x3 + l*x1*x4 + m*x2*x3 + n*x2*x4 + p*x3*x4 :

 Statistics:-LinearFit(
 model,
 < x1_values | x2_values | x3_values | x4_values >,
 y_values,
 [x||(1..4)]
 );

Is there a way to get the same output like the one given by Excel data analysis tool?

 SOmething like this

Reg_Maple_vs_Exce.mw (It's not my code, I got it from MP)

@Carl Love hehe, when we use a whole number as an increment then we get this fraction. Is it possible to get the output in decimal? 

@Carl Love 

You have made my day!!!!!!!!!

 

@Preben Alsholm 8 or 12 is a replacement for infinity.

@Preben Alsholm 

Yes there are two solutions

r2:=fsolve(p(.1,.1,.1,.1,f2)=0,f2=-.38003);


-0.3803660501


r1:=fsolve(p(.1,.1,.1,.1,f2)=0,f2=-.2967);

-.2966172000

 

First 9 10 11 12 13 14 15 Last Page 11 of 21