Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Cell Arrays into normal functions

조회 수: 1 (최근 30일)
Nikhil
Nikhil 2011년 9월 29일
마감: MATLAB Answer Bot 2021년 8월 20일
I have an array of cell arrays, s1=
'<1x2>'
'<1x2>'
'<1x2>'
'<1x2>'
i need to split them in to individual arrays so if
s1{1,:} = 'zzz' '23'
s1{2,:} = 'ppp' '43'
i want a string and double array in different arrays.
-- in realty the length of cell array is 40000 and each cell has a '<1x10>' so i need a way to split them and i am new to cell arrays and landed up into it because i was using from 'regexp'
  댓글 수: 1
Jan
Jan 2011년 9월 29일
The input has 4 elements with the values "<1x2>", and you wnat the result "'zzz', '23'" and "'ppp' '43'". I do not see a relation between the input and the output. I do not see a double array also.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 9월 29일
s1={'zzz' '23';'ppp' '43'};
a=s1(:,1)
b=cell2mat(s1(:,2))

이 질문은 마감되었습니다.

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by