i keep getting an error in my code about my array. pls help . code and error below thank you

cp5ques2.PNG

댓글 수: 2

We have no information about the size of x, xold,vold, aold, xtip1, xorig1, xtip2, xorig2, U, T, Us, Up, E, or R1 .
Xold, vold, aold, xtip1,2, xorig1,2 are all 2by1 . R1 is a 2x2. Rest are scalar just a number

댓글을 달려면 로그인하십시오.

답변 (1개)

CAM
CAM 2019년 10월 31일
When you are concatenating horizontally, the number of rows must be consistent. According to your comment, all variables are 1x1, but R1 is 2x2. Thus R1 is causing the error. Either change R1 to a single row, or put the variables into a cell array, which will allow for the different variable sizes.
Why are you taking the tranpose of scalers (xold', vold', ...) ?

댓글 수: 3

how do i change R1 to a single row ? the one im taking transpose of are 2x1, not scalers
so my 2x1 are xold, vold, aold, xtip 1 , xtip 2 , xorig1, xorig 2, are 2 x1,
R1 is a 2x2
and the rest are scalars
R1(:).' converts the 2 x 2 into 1 x 4

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Polynomials에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2019년 10월 31일

댓글:

2019년 10월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by