Unable to perform assignment because the left and right sides have a different number of elements.
1 view (last 30 days)
Show older comments
0 Comments
Accepted Answer
Jon
on 11 Feb 2020
Edited: Jon
on 11 Feb 2020
In your expression, the left hand side is just a scalar (only has one element) but you are trying to assign a length 4 column vector to it. This doesn't make sense.
It would be much simpler just to make your "100 sets of 4 random #'s" using one line in MATLAB
D = normrnd(50,10,[4,100])
This will produce a 4 by 100 matrix, where each column is a set of 4 random numbers
0 Comments
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!