create vector from 21 individual values from for-loop

1 visualización (últimos 30 días)
aet
aet el 10 de Jun. de 2019
Comentada: aet el 10 de Jun. de 2019
I have 21 values for K from my for-loop and need to makes these values into a vector. The end goal is to make a box plot. Any guidance?

Respuestas (1)

Jan
Jan el 10 de Jun. de 2019
K = zeros(1, 21); % Pre-allocation
for ii = 1:21
K(ii) = rand; % Insert your calculations here
end
If you post your code, a more matching answer is possible.
  3 comentarios
aet
aet el 10 de Jun. de 2019
This worked! Thank you!

Iniciar sesión para comentar.

Categorías

Más información sobre Interactive Control and Callbacks 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