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

KSSV
KSSV 2022년 5월 9일
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일

댓글:

2022년 5월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by