vector size and dimension

조회 수: 2 (최근 30일)
Kiyoko Christian Mwizu
Kiyoko Christian Mwizu 2020년 9월 17일
답변: BOB MATHEW SYJI 2020년 9월 17일
v1=linspace(-2,4,4)
the question is to multiple v1 by v1 transpose, then substract -2 from the this result.
Here is my code and output: mm=v1*v1';
i=mm-x
>>i=26
the feedback that i am getting from mathworks is this:Variable i must be of size [1 1]. It is currently of size [1 100].
Check where the variable is assigned a value. Please help
  댓글 수: 3
Romeo SIMO
Romeo SIMO 2020년 9월 17일
hello @Kiyoko, Can you give us a screen shot of your code? I have try to do the same thing and i do not have the same result. Maybe you made a mistake when you were writing your MATLAB code try this:
Kiyoko Christian Mwizu
Kiyoko Christian Mwizu 2020년 9월 17일
편집: Kiyoko Christian Mwizu 2020년 9월 17일
I did the same thing and got the same resultat as well but the feedback that I am getting on mathworks run script is different

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

답변 (1개)

BOB MATHEW SYJI
BOB MATHEW SYJI 2020년 9월 17일
Have you tried clear at the start. The clear command clears the variables in workspace.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by