Hello, I am trying to solve the following code with bvp4c
function inclinedcylinder(solver)if nargin<1 solver = 'bvp4c' ;endbvpsolver = fcnchk(solver);Pr = 7.0;A = -2.2;Ec = 1.0;Gr = 1;Rd = 1.0;Nt = 0.5;Nb = 0.7;Le = 3.0;M = 2;theta_w = 1.5;X = pi/4;infinity = 10;maxinfinity = 30;solinit = bvpinit(linspace(1,infinity,30),[0 1 0 1 0 0 0]);sol = bvpsolver(@inclode,@inclbc,solinit);for Bnew = infinity+1:maxinfinity solinit = bvpxtend(sol,Bnew); sol = bvpsolver(@inclode,@inclbc,solinit);eta = sol.x; f = sol.y;fprintf('\n');fprintf('Value computed for f''(0)= %g is %7.5f.\n',0,f(3,1))plot(eta,f(2,:),'m-.',eta(end),f(2,end),'Linesmoothing','on')drawnowaxis([1 8 -1 0.1]);xlabel('\eta')ylabel(' f '' (\eta)')endhold onfunction dfdeta = inclode(eta,f) dfdeta = [ f(2) f(3) (f(2)^2-f(1)*f(3)+ A*(f(2)+eta*f(3))-Gr*f(4)*cos(X)-Gc*f(6)*cos(X)+M*f(2))/eta-f(3)/eta f(5) ((Pr*(-f(1)*f(5))+Pr*(A*eta*f(5))-Pr*Ec*(f(3)^2)-Pr*Nb*eta*f(5)*y(7)-Pr*Nt*eta*(f(5)^2)))/eta-f(5)/eta*(1+Rd*(1+(theta_w-1)*f(4))^3) f(7) (-Le*(f(1)*f(7)-A*eta*f(7))-(Nt/Nb)*(f(5)+eta*((Pr*(-f(1)*f(5))+Pr*(A*eta*f(5))-Pr*Nb*eta*f(5)*y(7)-Pr*Nt*eta*(f(5)^2))/eta-f(5)/eta)))/eta-f(7)/eta ];endfunction res1 = inclbc(f1,finf) res1 = [f1(1)-0 f1(2)+1 finf(2)-0 f1(4)-1 finf(4)-0 f1(7)-(Nt/Nb)*f1(5)-0 finf(6)-0 ];
end end But I am getting the following error
Error in ==> bvp4c at 120 [n,npar,nregions,atol,rtol,Nmax,xyVectorized,printstats] = …
Error in ==> inclinedcylinder at 17 sol = bvpsolver(@inclode,@inclbc,solinit);
??? Error: File: inclinedcylinder.m Line: 11 Column: 6 Expression or statement is incomplete or incorrect.
Kindly help me to solve this problem
Best Answer