create vector from 21 individual values from for-loop

1 Ansicht (letzte 30 Tage)
aet
aet am 10 Jun. 2019
Kommentiert: aet am 10 Jun. 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?

Antworten (1)

Jan
Jan am 10 Jun. 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 Kommentare
Walter Roberson
Walter Roberson am 10 Jun. 2019
K(i) = kurtosis(V);
aet
aet am 10 Jun. 2019
This worked! Thank you!

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by