Filter löschen
Filter löschen

vector size and dimension

4 Ansichten (letzte 30 Tage)
Kiyoko Christian Mwizu
Kiyoko Christian Mwizu am 17 Sep. 2020
Beantwortet: BOB MATHEW SYJI am 17 Sep. 2020
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 Kommentare
Romeo SIMO
Romeo SIMO am 17 Sep. 2020
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 am 17 Sep. 2020
Bearbeitet: Kiyoko Christian Mwizu am 17 Sep. 2020
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

BOB MATHEW SYJI
BOB MATHEW SYJI am 17 Sep. 2020
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