Hi, I tried to use ode23 by using Matlab (R2009), but I get error message " unbalanced or unexpected parenthesis or bracket". why there is error because using "~".

1 view (last 30 days)
[t1,~] = ode23(@(t,x) deriv(t,x,0, xd, @(t) u(z,t)), [0 2], init(xd),opt);

Accepted Answer

Star Strider
Star Strider on 28 May 2015
We would have to see more of your code to know what the problem is.
You are defeating the purpose of integrating your ODE because you are suppressing the output of the integrated function and returning only the time vector.
Completely guessing here, but see if this works:
[t1,x1] = ode23(@(t,x) deriv(t,x,0, xd, u(z,t)), [0 2], init(xd),opt);

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!