Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Search results for query: *

  1. Matthew2005

    MatLab: calling ode45 with parameter passing in

    % How do I call sumX in ode45 where I can pass in 'ab' paramter? x & y are part of the ODE problems % tspan=[0 20] initial value: [0 1] options [] [T Y]=ode45(@sumX,[0 10],[0 1],[]); % sumX.m function dy=sumX(ab,x,y) dy1=y(2); dy2=-y(1)+ab*(y(1)^2); dy=[dy1; dy2]; %%%%%%%%%%%%%%% Thanks
Back
Top