필터 지우기
필터 지우기

How to convert matrices in a unique cell

조회 수: 2 (최근 30일)
Alan
Alan 2011년 9월 16일
Hi, I have several matrices in my workspace and I want to put them inside of unique cell. How can I do this?

채택된 답변

Andrei Bobrov
Andrei Bobrov 2011년 9월 16일
Your matrix A and B
C = {A, B}
variant for 100 matrixes
vars = whos;
c=cell(numel(vars),1);
for j1=1:numel(c),c{j1} = eval(vars{j1}); end
  댓글 수: 2
Alan
Alan 2011년 9월 16일
This is correct, but, for example, If I have 100 matrices and I don't want to write each one, How can I do?
Walter Roberson
Walter Roberson 2011년 9월 16일
See http://matlab.wikia.com/wiki/FAQ#How_can_I_create_variables_A1.2C_A2.2C....2CA10_in_a_loop.3F

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by