Is it possible to solve an ODE with boundary condition using a matlab solver?
Mostrar comentarios más antiguos
My question is very simple: I want to plot a graphic for the deflection of a beam, with consists of a solution of an ODE using a Matlab solver, such as:
%Call Solver -> Linear
[x y] = ode45(@MyFunctionL,xspan, x0);
x0 = [0 0];
xspan = [0 Lg];
function dy = MyFunctionL(x,y)
global Fg Lg EI;
dy = zeros(2,1);
dy(1) = y(2);
dy(2) = (Fg/EI)*(Lg - x);
return
It works perfectly at first, but in another case in which I have to set a condition such as y´(Lg/2)=0 I am having some trouble. It should result in a sort of Parabolic y(x) if I could "insert" this boundary condition.
I wish to know if I can do it using a MATLAB solver or only with bvp4c. (I am interested in doing with a solver because later I have to compare the linear solution with a non linear solution)
Thanks very much!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!