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

3 次查看(过去 30 天)
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!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Ordinary Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by