Info

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

bvp4c or classical odesolver

1 view (last 30 days)
Moritz
Moritz on 23 Jul 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello,
i solved an initial BVP by the method of lines in the following way:
i=1;
dvdt(i)= -omega^2/dx.*((xcen(i)-0.5*dx)*feo('ffun',v(i),v(i+1))) + ...
1/dx^2*(Ax(i+1)-Ax(i));
i=2:N-1;
dvdt(i)= -omega^2/dx.*((xcen(i)+0.5*dx).*F(i)...
-(xcen(i)-0.5*dx).*F(i-1)) + 1/dx^2*(Ax(i+1)-2*Ax(i)+Ax(i-1));
i=N;
dvdt(i)= omega^2/dx*(xcen(end)-0.5*dx)*feo('ffun',v(i-1),v(i)) - ...
1/dx^2*(Ax(i)-Ax(i-1));
Is it better or probably faster to use bvp4c instead ? What are the reasons why i would like to use bvp4c and not the approach i used ?
Any comments are appreciated
Best Wishes
Moritz

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!