I want the value of gama1 to be obtained from the following equation.
Show older comments
following is the code that i have written for obtaining the value of the 'gama1' variable. The issue i am facing is that when i run the code, i am gettin an error message but then again, it still gives the value of 'gama1'. so i wanted to know whats actually goin wrong with my code.
T0= (4.5e-4-(8*Tw*K))./((4.5e-4)-20*K);
T1=(4*T0-Tw)/3;
%gama1=0.6;
der1=(gama1-gama_p)/(2*h);
AA=m*C.*power(T0,v)*(gama_p^n)*power(der1,(m-1))* (gama1+gama_p)/(h^2);
BB= v*C.*power(T0,v-1)*(gama_p^(n))*power(der1,m).*((T1-Tw)/(2*h));
ZZ=n*C*power(der1,m+1).*power(T0,v)*(gama_p^(n-1))-C.*D*der1;
%function F=hola(gama1,gama_p,h,m,C,T0,v,n,T1,Tw,D)
%F=@(gama1) AA+BB+ZZ;
F=@(gama1) (m*C.*power(T0,v)*(gama_p^n)*power(der1,(m-1))* (gama1+gama_p)/(h^2))+(v*C.*power(T0,v-1)*(gama_p^(n))*power(der1,m).*((T1-Tw)/(2*h)))+(n*C*power(der1,m+1).*power(T0,v)*(gama_p^(n-1))-C.*D*der1);
gama1=fzero(F,0);
in the above equation , i have values of all the parameters.
Thank you helpers.much appreciated :-)
Accepted Answer
More Answers (0)
Categories
Find more on Function Creation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!