matlab - Error in using fzero -
i trying solve non-linear equation using while loop in matlab it's not giving me results , give me error in line uses fzero function.
why happens? how solve issue? me this? in advance.
function z=optp(z,p) z=3.067; p=0; while (z-p) > 0.8 syms y q p p=z; w=3; c=1; p=5; b=1.2; c=8; b=0.5; r=a^b*c*p^-b; q=(0.5-1/(p+5))*2400*((a^0.5)/(p^(6/5))); x=q; j1=int(int(a*x*0.01,y,a*x/r,100),a,0,q/x); j2=(b*x^2*0.01/r)*int(a^2*1,a,0,q/x); j3=(p*r*b/p)*(int(int(y*0.01,y,a*x/r,100),a,0,q/x)); j4=(b*r^2/x)*int(y^2*0.01,y,0,q/r); j5=(r*0.2)*(int(int(y*0.01,a,y*r/x,1),y,0,q/r)); j=j1+j3+j4-j2-j5; z=fzero(@ (p) j,p) end end
Comments
Post a Comment