Matrix dimensions must agree.
2 views (last 30 days)
Show older comments
hi, I am getting this error in my code. can anybody help me with this. Thank you in advance.
Accepted Answer
Stephen23
on 15 Apr 2016
Edited: Stephen23
on 15 Apr 2016
/
./
And read this to know the difference:
because you will fix that line and get exactly the same error on the following lines. When you understand the difference between matrix and array operations then you can solve this yourself.
3 Comments
Stephen23
on 15 Apr 2016
Edited: Stephen23
on 15 Apr 2016
The Runge-Kutta method looks okay, except that you are missing the for operator. You should use [your favorite internet search engine] to find examples of Runge-Kutta implementation using MATLAB (there are lots of them). Then you can compare your work, and decide if it is okay.
More Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements 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!