Info

This question is closed. Reopen it to edit or answer.

Set of Equations for BVP

2 views (last 30 days)
Peter Moped
Peter Moped on 23 Jan 2016
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello everybody, I would like to solve the fallowing:
dxds= cos(φ), dyds= sin(φ), dφds= κ, dκds= F * cos(φ), dFds= 0
with
x(0) = 0 y(0) = 0 κ(0) = 0 φ(0) = n*pi/16 φ(1) = -pi/2
but my own written code does not work. I used
y1 = x, y2 = y, y3 = φ, y4 = κ
Can anybody tell me where my mistake is?
function test
F = 1;
solinit = bvpinit(linspace(0,1,1000),[0,0,pi,0],F);
sol = bvp4c(@mat4ode,@mat4bc,solinit,options);
function dydx = mat4ode(x,y,F)
dydx = [ cos(y(3))
sin(y(3))
y(4)
F*cos(y(3))];
function res = mat4bc(ya,yb,F)
res = [ ya(1)
ya(2)
ya(4)
ya(3)-pi/2
yb(3)+pi/2];
  1 Comment
Torsten
Torsten on 25 Jan 2016
You did not tell us what you mean by "my own written code does not work" .
Best wishes
Torsten.

Answers (0)

Community Treasure Hunt

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

Start Hunting!