ode - Matlab error for ODE23t function -
i posting program:
function dz=film(t,h) global eo d e1 ho gr_pn phiup dx bl bu eo=8.85e-12; e1=2.5; phiup=20; gamma=0.048; nu=1; a=1.51e-20; d=100e-9; lo=1e-9; ho=20e-9; lambda=(2*pi*((e1*d)-((e1-1)*ho))^1.5)/(((eo*e1*((e1-1)^2))^0.5)*phiup); k=(2*pi)/lambda; grid_l=4*lambda; grid_l_dmn=grid_l*((0.5*eo*e1*(e1-1)*(phiup^2))^0.5)/((gamma*(ho^3))^0.5); grid_point=200; dx=grid_l_dmn/grid_point; grd_pn=grid_point+1; size(dx) grid_point=200; dx=grid_l_dmn/grid_point; grd_pn=grid_point+1; size(dx) i= 1 : grd_pn z(i) = 4 ; h_initial(i)=ho* sin(k* z(i)); h_initial(i)=h_initial(i)/ho; end t=2; tm_dmn1=t*(0.5*eo*e1*(e1-1)*(phiup^2))/(3*nu*gamma*ho); grid_time=200; tm_div=tm_dmn1/grid_time; tinitial=0; gr_tme=grid_time+1; j=1:gr_tme tend=tinitial+tm_div; end tspan=[tinitial tend]; [t,h]=ode45 ('filmode',tspan,h_initial); bl=(((a/(6*pi*(lo^3)))-((0.5*eo*e1(e1-1)*phiup^2)/((e1*d-(e1-1)*lo)^2)))*(lo^9))/8; bu=(((a/(6*pi*((d-lo)^3)))-((0.5*eo*e1(e1-1)*phiup^2)/((e1*d-(e1-1)*(d-lo))^2)))*((d-lo)^9))/8; end function dhdt=filmode(t,h) %declaring ode global eo d e1 gr_pn ho phiup dx bl bu i=3:gr_pn-3 phi(i)=a/(6*pi*(h(i)^3)*(ho^3))-(8*bl/((h(i)^9)*(ho^9)))+(8*bu/((d-(h(i)*ho))^9))-((0.5*eo*e1*(e1-1)*(phiup^2))/(((e1*d)-(e1-1)*h(i)*ho)^2)); dhdz(i)=(h(i+1)-h(i-1))/(2*dx); d3hdz3(i)=(h(i+2)-(2*h(i+1))+(2*h(i-1))-h(i-2))/(2*(dx^3)); d4hdz4(i)=(h(i+2)-(4*h(i+1))+(6*h(i))-(4*h(i-1))+h(i-2))/(dx^4); dphidz(i)=(phi(i+1)-phi(i-1))/(2*dx); d2phidz2(i)=(phi(i+1)-(2*phi(i))+phi(i-1))/(dx^2); dhdt=@(t,h)(3*(h(i)^2)*dhdz(i)*d3hdz3(i))+((h(i)^3)*d4hdz4(i))-(3*(h(i)^2)*dhdz(i)*dphidz(i))- ((h(i)^3)*d2phidz2(i)); end end `
when effort run error
??? error using ==> feval undefined function or method 'filmode' input arguments of type 'double'.
error in ==> odearguments @ 110 f0 = feval(ode,t0,y0,args{:}); % ode15i sets args{1} yp0.
error in ==> ode45 @ 173 [neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeargs, odefcn, ...
error in ==> cinema @ 39 [t,h]=ode45('filmode',tspan,h_initial);
there threads here notify type of error unable find link why error occurring programme grateful if this of import programme me
matlab ode
No comments:
Post a Comment