MATLAB Answers

vector size and dimension

1 ビュー (過去 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 件のコメント
Kiyoko Christian Mwizu
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.

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by