Store answers in multiple variables?
이전 댓글 표시
Hello,
I have a variable B which outputs about 100 cells. Assuming N = 4, how do I go about obtaining cell2mat(B(N(1)) in a new variable x_1, cell2mat(B(N(2)) in x_2, and so forth? Currently I am using:
for cnt = 1:N
hold on;
x = cell2mat(B(cnt));
end
Thanks in advance!
-- Jake
댓글 수: 2
Daniel Shub
2011년 9월 28일
In general, you probably do not want to be doing this. Why do you want x1, x2, ... It is only going to lead to evil eval statements later.
Jake Bolanski
2011년 10월 1일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!