필터 지우기
필터 지우기

Double to cell from workspace?

조회 수: 364 (최근 30일)
sandy
sandy 2014년 3월 14일
댓글: SRI 2014년 3월 14일
i have a variable which is (2100*40 double) .i need to convert to each to a cell.the outpur as (2100*40 cell)
  댓글 수: 1
SRI
SRI 2014년 3월 14일
Yes you can use num2cell()

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

채택된 답변

Walter Roberson
Walter Roberson 2014년 3월 14일
num2cell()

추가 답변 (2개)

Mischa Kim
Mischa Kim 2014년 3월 14일
편집: Mischa Kim 2014년 3월 14일
Sandy, use mat2cell, or, simply, curly braces:
A = [1 2 3; 4 5 6]; % numeric array
B = {A}; % cell array
C = mat2cell(A); % cell array

David Sanchez
David Sanchez 2014년 3월 14일
data = rand(3,5); % your data here
create cell with data
cell_data = num2cell(data);
you can also take a look at
mat2cell

카테고리

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