How to convert BVP to IVP for a system of coupled complex equation......

3 views (last 30 days)
Hello all, I tried this code to convert from bvp to Ivp and get the corrected slope. But it shows error. please help...
function shooting_method_coupled_system
x=[0.6+(i*0.5432),0.6+(i*0.6543)] % initial guess values for the slope ie.(dur/dt)&(duz/dt) @ r=0
%options=optimset('Display','iter')
x1=fsolve(@solver,x)
end
function F=solver(x)
tspan=linspace(0,1,3)
options=odeset('RelTol',1e-8,'AbsTol',[1e-8 1e-8 1e-8 1e-8])
[t,u]=ode45(@equation,tspan,[0 x(1) 0 x(2)],options) % ur=uz=0 @ r=0
s=length(t)
F=[u(s,1)-(1.5+(i*0.5678)),u(s,3)-(1.7+(i*0.3768))] % putting the value of ur=(1.5+(i*0.5678)) and uz=(1.7+(i*0.3768)) @r=1 respectively
figure(1)
plot(t,u(:,1),t,u(:,3))
end
function dy=equation(T,Y)
dy = [Y(2);Y(1).*(4.1024+1.28e+1i)+Y(2).*6.4e-1i-Y(1).*Y(2).*1.0e+1+5.568e+2i;Y(4);(Y(1).*2.0+Y(4)).*Y(4)+Y(1).*(-2.082048e+1-1.28i)-Y(2).*3.2i-Y(4).*1.041024e+1]
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!