MATLAB Answers

Alex F
0

I keep receiving this error. Unable to perform assignment because the indices on the left side are not compatible with the size of the right side. What does this mean? I am going to use the values in this array in a for loop which I am going to plot.

Asked by Alex F
on 16 Sep 2018
Latest activity Answered by Walter Roberson
on 16 Sep 2018
Cd(a)=[ 0 0 0 0 .5 .10 1 .15 .20];

  0 Comments

Sign in to comment.

Products

1 Answer

Answer by Walter Roberson
on 16 Sep 2018

For that to work, variable a would have to be a vector of 9 positive integral values, or else a would have to be logical and have 9 locations that were true.
Note that if you are using Octave (the wording of the error message is not what MATLAB would use) then the rules could potentially be different.

  0 Comments

Sign in to comment.