how to pass data of a cell to matrix??..

조회 수: 1 (최근 30일)
sani ars
sani ars 2013년 7월 18일
i have the code as follows:
textdata1(:,:) = textdata(:,1);
for j= 1:size(evrtng)
tkn = textdata1{j,1};
st_splt= strsplit(tkn);
= cell2mat(st_splt);
end
st_splt is a cell.... Now I don't want to have cells into cell... so that want to pass all the cells data to a matrix .... what should i write on the left side of the assignment statement of cell2mat() in the above for loop??
  댓글 수: 1
Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 18일
편집: Azzi Abdelmalek 2013년 7월 18일
Give un example of your data, when you type your variable in command windows, what do you get? what is the size of each cell?

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

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 18일
Example
a={{1} {2} {3}}
out=horzcat(a{:})

카테고리

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