Borrar filtros
Borrar filtros

how to assign an alphabet to a column in matlab

1 visualización (últimos 30 días)
Tino
Tino el 10 de Abr. de 2019
Comentada: Tino el 10 de Abr. de 2019
0.6164
3.1654
0.5745
2.9883
0.9381
2.1817
I have this column below and I want to assign another column to the numbers such as
0.6164 c1
3.1654 c2
0.5745 c1
2.9883 c2
0.9381 c1
2.1817 c2
How to I go about it . thanks

Respuesta aceptada

madhan ravi
madhan ravi el 10 de Abr. de 2019
a=[ 0.6164
3.1654
0.5745
2.9883
0.9381
2.1817];
b=repmat(['c1';'c2'],size(a,1)/2,1);
% ^^--- assuming rows are even if not use some rounding function
T=table;
T.A=a;
T.B=b
  4 comentarios
madhan ravi
madhan ravi el 10 de Abr. de 2019
Editada: madhan ravi el 10 de Abr. de 2019
Hmm, sounds like a different question, post a separate question which addresses the issue with an explicit example.
Tino
Tino el 10 de Abr. de 2019
ok I will do that thanks

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Spectral Measurements en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by