how to use pulstran with ode45 function
Show older comments
I have tried to use pulstran with ode45 function but i got this problem ''DE_MDOF returns a vector of length 3005, but the length of initial conditions vector is 6. The vector returned by ODE_MDOF and the initial conditions vector must have the same number of elements.''
2 Comments
The error is telling you that the function which you evaluate to get your derivatives (I assume this is ODE_MDOF) returns a different number of elements than the vector of initial conditions that you are supplying. They should of course be the same as you need to have a derivative for each state and an initial condition for each state. If you still can not figure out where things are going wrong that are resulting in the lengths of the two vectors being inconsistent, then please provide the relevant portions of your code.
Hamza Khalil
on 27 Aug 2019
Answers (0)
Categories
Find more on Programming 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!