Getting errors on must return a coloumn vector

function dx=system(t2,x2)
global u;
dx(1,1)=x2(2)+u;
dx(2,1)=0;
[t2,x2]=ode45(@system, tspan,[0.005,0]);
Showing error in dx(1,1)=x2(2)+u;
as unable to perform assignment because left and right hand side are not compatible with sizes.

1 个评论

Check the dimensions of u. It seems u is a vector and x2(2)+u is a vector which cannot be saved into a single element dx(1,1).

请先登录,再进行评论。

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Spline Postprocessing 的更多信息

产品

版本

R2022a

评论:

2022-5-9

Community Treasure Hunt

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

Start Hunting!

Translated by