Merging of Cell data into one entry.

1 Ansicht (letzte 30 Tage)
azizullah khan
azizullah khan am 20 Jul. 2014
Bearbeitet: Azzi Abdelmalek am 20 Jul. 2014
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 Kommentar
azizullah khan
azizullah khan am 20 Jul. 2014
??? Undefined function or method 'strjoin' for input arguments of type 'cell'.
error occurs.........due to of type cell...

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 20 Jul. 2014
Bearbeitet: Azzi Abdelmalek am 20 Jul. 2014
A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=strjoin(A,',')
  3 Kommentare
Wayne King
Wayne King am 20 Jul. 2014
what version of MATLAB are you using?
Azzi Abdelmalek
Azzi Abdelmalek am 20 Jul. 2014
Bearbeitet: Azzi Abdelmalek am 20 Jul. 2014
Try this
A={'AMEX' 'ARCA' 'BATS' 'BEX' 'CHX'};
B=cell2mat([strcat(A(1:end-1),',') A(end)])

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Modify Image Colors finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by