Merging of Cell data into one entry.

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 Comment

??? Undefined function or method 'strjoin' for input arguments of type 'cell'.
error occurs.........due to of type cell...

Sign in to comment.

 Accepted Answer

A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=strjoin(A,',')

3 Comments

??? Undefined function or method 'strjoin' for input arguments of type 'cell'.
error occur for cell....
what version of MATLAB are you using?
Try this
A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=cell2mat([strcat(A(1:end-1),',') A(end)])

Sign in to comment.

More Answers (0)

Categories

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!