leo20002000

76 Reputation

2 Badges

16 years, 151 days

MaplePrimes Activity


These are replies submitted by leo20002000

Hi

Thank you for you reply, I have tried to plot 2 graphs using two set of coefficients and I find that both sets of coefficients gives a resonable good fit compared to the orignial data,which means that those two sets of coefficients are good fit.Now here comes the question, are both set of data ok.how to choose which one to use?are there more than two set of coefficients there? how can I find out how many of them are there?

ps: the input data is manually chosen which mean that I can choose 20,30,...100 etc. I found that if we choose different number of input data, the coefficients i got are different.How to solve this problem then?e.g

 

restart; with(Statistics): Ein:=Vector([0.2,0.4,0.5,0.6,0.7,0.8,0.9,0.92,0.95,1,1.02,1.04,1.06,1.08,1.1,1.12,1.14,1.16,1.178]): UEin:=Vector([0.01576213,0.629139894,1.457776151,2.958910418,5.605599058,10.20002179,17.77607359,19.57451259,22.81827108,29.34874031,32.35324584,35.41703504,39.08008982,42.71086444,46.46475176,50.53683716,55.48548924,60.4973377,64.70966192]): Emax:=1.52: Fit(.5*A*E^2+B*E^beta/(Emax-E)^alpha, Ein, UEin, E); 2 3.0379219361076 E 5.33838295590942913 0.0936787869623638970 + 27.9735953381858770 E (1.52 - E) > I simply delete (0,0)of(E,UE),you can see the coefficient are significantly different!!

Hi

Thank you for you reply, I have tried to plot 2 graphs using two set of coefficients and I find that both sets of coefficients gives a resonable good fit compared to the orignial data,which means that those two sets of coefficients are good fit.Now here comes the question, are both set of data ok.how to choose which one to use?are there more than two set of coefficients there? how can I find out how many of them are there?

ps: the input data is manually chosen which mean that I can choose 20,30,...100 etc. I found that if we choose different number of input data, the coefficients i got are different.How to solve this problem then?e.g

 

restart; with(Statistics): Ein:=Vector([0.2,0.4,0.5,0.6,0.7,0.8,0.9,0.92,0.95,1,1.02,1.04,1.06,1.08,1.1,1.12,1.14,1.16,1.178]): UEin:=Vector([0.01576213,0.629139894,1.457776151,2.958910418,5.605599058,10.20002179,17.77607359,19.57451259,22.81827108,29.34874031,32.35324584,35.41703504,39.08008982,42.71086444,46.46475176,50.53683716,55.48548924,60.4973377,64.70966192]): Emax:=1.52: Fit(.5*A*E^2+B*E^beta/(Emax-E)^alpha, Ein, UEin, E); 2 3.0379219361076 E 5.33838295590942913 0.0936787869623638970 + 27.9735953381858770 E (1.52 - E) > I simply delete (0,0)of(E,UE),you can see the coefficient are significantly different!!
Scott ,thank you so much for replying my questions. I tried the way you are using to find coefficients.However, the results I get is differenct with what you have obtained.Here are what I have tried: restart; with(Statistics): Ein:=Vector([0,0.2,0.4,0.5,0.6,0.7,0.8,0.9,0.92,0.95,1,1.02,1.04,1.06,1.08,1.1,1.12,1.14,1.16,1.178]): UEin:=Vector([0,0.01576213,0.629139894,1.457776151,2.958910418,5.605599058,10.20002179,17.77607359,19.57451259,22.81827108,29.34874031,32.35324584,35.41703504,39.08008982,42.71086444,46.46475176,50.53683716,55.48548924,60.4973377,64.70966192]): Emax:=1.52: Fit(.5*A*E^2+B*E^beta/(Emax-E)^alpha, Ein, UEin, E); -85.806303325380*E^2+92.6229168965963652*E^2.03381404705712621/(1.52-E)^.332390778517891283 Don't know what could be the reason why we have different output. I have currently useing Maple 11 if this helps. Also, using the fit function,is there a minimum vector input data ?As you can see I am trying to get 4 coefficients?Does it also mean if we have more input data, the coefficients will also be different? Thanks again Sam
Scott ,thank you so much for replying my questions. I tried the way you are using to find coefficients.However, the results I get is differenct with what you have obtained.Here are what I have tried: restart; with(Statistics): Ein:=Vector([0,0.2,0.4,0.5,0.6,0.7,0.8,0.9,0.92,0.95,1,1.02,1.04,1.06,1.08,1.1,1.12,1.14,1.16,1.178]): UEin:=Vector([0,0.01576213,0.629139894,1.457776151,2.958910418,5.605599058,10.20002179,17.77607359,19.57451259,22.81827108,29.34874031,32.35324584,35.41703504,39.08008982,42.71086444,46.46475176,50.53683716,55.48548924,60.4973377,64.70966192]): Emax:=1.52: Fit(.5*A*E^2+B*E^beta/(Emax-E)^alpha, Ein, UEin, E); -85.806303325380*E^2+92.6229168965963652*E^2.03381404705712621/(1.52-E)^.332390778517891283 Don't know what could be the reason why we have different output. I have currently useing Maple 11 if this helps. Also, using the fit function,is there a minimum vector input data ?As you can see I am trying to get 4 coefficients?Does it also mean if we have more input data, the coefficients will also be different? Thanks again Sam

Hi,Alec,I tried one more time with the following command,and it give what I want.However i am wondering is it possible for me to get every q1 and q2 ??

 

for i to 8 do p:=P[i]; q:=Q[i]; f:=F[i]; a:=A[i]; print(i,fsolve({eq1,eq2},{q1=0..infinity,q2=0..infinity})) od: 1, {q1 = 1.675260761, q2 = 0.8722306525} 2, {q1 = 1.851678319, q2 = 0.8665145191} 3, {q1 = 2.086188574, q2 = 0.8561477105} 4, {q1 = 2.425716053, q2 = 0.8366877889} 5, {q2 = 0.8070536014, q1 = 2.928227278} 6, {q1 = 3.688479541, q2 = 0.7672768782} 7, {q1 = 4.765272311, q2 = 0.7269832262} 8, {q1 = 6.419858155, q2 = 0.6830111442}

Hi,Alec,I tried one more time with the following command,and it give what I want.However i am wondering is it possible for me to get every q1 and q2 ??

 

for i to 8 do p:=P[i]; q:=Q[i]; f:=F[i]; a:=A[i]; print(i,fsolve({eq1,eq2},{q1=0..infinity,q2=0..infinity})) od: 1, {q1 = 1.675260761, q2 = 0.8722306525} 2, {q1 = 1.851678319, q2 = 0.8665145191} 3, {q1 = 2.086188574, q2 = 0.8561477105} 4, {q1 = 2.425716053, q2 = 0.8366877889} 5, {q2 = 0.8070536014, q1 = 2.928227278} 6, {q1 = 3.688479541, q2 = 0.7672768782} 7, {q1 = 4.765272311, q2 = 0.7269832262} 8, {q1 = 6.419858155, q2 = 0.6830111442}
P := [1.4796*10^6, 5.2864*10^6, 1.23659*10^7, 2.62787*10^7, 4.91671*10^7, 8.35639*10^7, 1.234755*10^8, 1.741076*10^8] Q := [1.6972*10^6, 6.0638*10^6, 1.41844*10^7, 3.01432*10^7, 5.63976*10^7, 9.58527*10^7, 1.416336*10^8, 1.997117*10^8] F := [.6, .55, .5, .45, .4, .35, .3, .25] A := [5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8] for i to 8 do p:=P[i][]; q:=Q[i][]; f:=F[i][]; a:=A[i][]; print(i,fsolve({eq1,eq2},{q1,q2})) od: fsolve({((1.6972 10^6)[]^2)/((5.00 10^8)[]^2)+2 q1 0.6[] cosh(3/2 ((1.4796 10^6)[] q2)/((5.00 10^8)[]))-1-q1^2 0.6[]^2=0,(1.6972 10^6)[]=(5.00 10^8)[] q1 0.6[] sinh(3/2 ((1.4796 10^6)[] q2)/((5.00 10^8)[])) q2},{q1,q2}) This is what I get,it is right.but just can't not solve q1,q2
P := [1.4796*10^6, 5.2864*10^6, 1.23659*10^7, 2.62787*10^7, 4.91671*10^7, 8.35639*10^7, 1.234755*10^8, 1.741076*10^8] Q := [1.6972*10^6, 6.0638*10^6, 1.41844*10^7, 3.01432*10^7, 5.63976*10^7, 9.58527*10^7, 1.416336*10^8, 1.997117*10^8] F := [.6, .55, .5, .45, .4, .35, .3, .25] A := [5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8, 5.00*10^8] for i to 8 do p:=P[i][]; q:=Q[i][]; f:=F[i][]; a:=A[i][]; print(i,fsolve({eq1,eq2},{q1,q2})) od: fsolve({((1.6972 10^6)[]^2)/((5.00 10^8)[]^2)+2 q1 0.6[] cosh(3/2 ((1.4796 10^6)[] q2)/((5.00 10^8)[]))-1-q1^2 0.6[]^2=0,(1.6972 10^6)[]=(5.00 10^8)[] q1 0.6[] sinh(3/2 ((1.4796 10^6)[] q2)/((5.00 10^8)[])) q2},{q1,q2}) This is what I get,it is right.but just can't not solve q1,q2

I did what you have said,the result it turned out that it only give the expression of two equtions and it doesn't  calculate q1 and q2!

My command is:

for i to 8 do

p:=P[i][];

q:=Q[i][];

f:=F[i][];

a:=A[i][];

print(i,fsolve({eq1,eq2},{q1,q2})) od:

Result I got:

 just simply replace p,q,f,a in eq1and eq2 but do not cal q1,q2,don't know what is the reason

 

I did what you have said,the result it turned out that it only give the expression of two equtions and it doesn't  calculate q1 and q2!

My command is:

for i to 8 do

p:=P[i][];

q:=Q[i][];

f:=F[i][];

a:=A[i][];

print(i,fsolve({eq1,eq2},{q1,q2})) od:

Result I got:

 just simply replace p,q,f,a in eq1and eq2 but do not cal q1,q2,don't know what is the reason

 

hi Alec

I tried the method you useing above to solve my euations.However,I got the following error information::

Error, cannot split rhs for multiple assignment

Don't know why when you sovle them you don't have this

 

Sam

hi Alec

I tried the method you useing above to solve my euations.However,I got the following error information::

Error, cannot split rhs for multiple assignment

Don't know why when you sovle them you don't have this

 

Sam

Page 1 of 1