ode45 problem. error using * inner matrix dimensions must agree.

1 view (last 30 days)
Hi all,
I have a problem with using ode45.
When I use this command line:
[T, X] = ode45(@calc_Tdot, t_range, Tvec0);
I get an error which says 'error using *, inner matrix dimensions must agree'. Here t_range = 0:10000. Tvec0 is a column vector with a certain no. of entries. calc_Tdot is a function which has the expression for Tvec_dot = M\(Qvec-(U*Tvec0)). U is an n x n matrix where n = no of entries in Tvec0. M is also an n x n matrix.
Where am i going wrong in getting T and X?
I have checked the matrix dimensions. They are perfectly alright and it should be able to multiply them!
Please help, been stuck on this for a long long time!
Thank you!

Answers (0)

Community Treasure Hunt

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

Start Hunting!