create vector from 21 individual values from for-loop
조회 수: 1 (최근 30일)
이전 댓글 표시
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?
답변 (1개)
Jan
2019년 6월 10일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!