how to vertically cascade a string vector and a numerica matrix
Mostrar comentarios más antiguos
a={'time','channel1','channel2','channel3'}; b=[ 1 2 3 5; 4 2 6 7; 8 5 1 9; 3 2 4 6; 7 6 0 8]; how to vertically cascade the two, so the first row is a, and b has the same column number (4)?
Respuesta aceptada
Más respuestas (1)
If tables as per Steven Lord's suggestion don't work for you then:
c = [a; num2cell(b)]
I'd recommend going with a table though.
1 comentario
Tina Zhao
el 23 de Mzo. de 2016
Categorías
Más información sobre Genomics and Next Generation Sequencing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!