how to feed one string to array on NaN?
Mostrar comentarios más antiguos
Dear MATLABERs :)
Is it possible to add a string to an array of NaN The next example does not work N = NaN(10,1); N(5,1)='Stop'; the result should be a column of NaN but the fifth element is Stop.
Thanks Aziz
Respuesta aceptada
Más respuestas (2)
James Tursa
el 19 de En. de 2017
1 voto
No, you can't combine character strings as elements of a numeric array like that. To combine different data types in one variable, consider using a cell array.
Abdulaziz Abutunis
el 19 de En. de 2017
0 votos
Categorías
Más información sobre Cell Arrays 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!