Is it possible to solve an ODE with boundary condition using a matlab solver?
이전 댓글 표시
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!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!