Merging of Cell data into one entry.

조회 수: 1 (최근 30일)
azizullah khan
azizullah khan 2014년 7월 20일
편집: Azzi Abdelmalek 2014년 7월 20일
ans =
Columns 1 through 6
'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX' 'CSFBCROSS'
Columns 7 through 12
'DRCTEDGE' 'EDGEA' 'ISE' 'ISLAND' 'LAVA' 'NITEECN'
Column 13
'NSX'
ans is a cell of size 1 x 13 i want the data to be like ans ='AMEX,ARCA,BATS,BEX,CHX,CSFBCROSS,and so on' please help me..if any problem open the attachment...thanks in advance...
  댓글 수: 1
azizullah khan
azizullah khan 2014년 7월 20일
??? Undefined function or method 'strjoin' for input arguments of type 'cell'.
error occurs.........due to of type cell...

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

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 20일
편집: Azzi Abdelmalek 2014년 7월 20일
A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=strjoin(A,',')
  댓글 수: 3
Wayne King
Wayne King 2014년 7월 20일
what version of MATLAB are you using?
Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 20일
편집: Azzi Abdelmalek 2014년 7월 20일
Try this
A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=cell2mat([strcat(A(1:end-1),',') A(end)])

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Scope Variables and Generate Names에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by