필터 지우기
필터 지우기

How can I put data into cell array at once time?

조회 수: 1 (최근 30일)
Haksun Lee
Haksun Lee 2012년 6월 14일
Hello~
I am beginner in Matlab.
I know cell function create m-by-n cell array.
For example, temp=cell(1,10) command create cell array of 1-by-10.
I have a question here.
I'd like to put data of 10 into cell array simultaneously.(ex. not to temp(1)=1, temp(2)=3,..temp(10)=2)
Which command can I use if I set the data at cell array at the same time.
I need your help, please.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 6월 14일
temp = cell(1,10);
temp([1,2,10]) = {1,3,2}
other way
temp = num2cell([1:9,2]);
etc.
  댓글 수: 1
Haksun Lee
Haksun Lee 2012년 6월 15일
I resolved my problem thanks to your help.
Have a nice day!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by