Unable to perform assignment because the left and right sides have a different number of elements.

1 visualización (últimos 30 días)

Respuesta aceptada

Jon
Jon el 11 de Feb. de 2020
Editada: Jon el 11 de Feb. de 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

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by