Error when using ode45 command,"returns a vector of length 11, but the length of initial conditions vector is 1."
Show older comments
function dw_dt = equation_(t,w)
a = 1;
b = 1.35;
v= [.6:.01:.70].';
dw_dt = a*w.^(v)-b*w;
%actual script
time_period = [0 20];% time period between 0 and 20 weeks
w0 = 0.5;% intial weight of the fish
[t,w] = ode45('equation_',time_period,w0);
I'm trying to run my function using ode45. I should be able to run the function for every value of yv but for some reason i can't. when ever i try to run the function for once value of V is works perfectly fine but when i try to run it for every value of v it does not work well.
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!