create vector from 21 individual values from for-loop

2 views (last 30 days)
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?

Answers (1)

Jan
Jan on 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 Comments

Sign in to comment.

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!