converting numbers to characters in a matrix
Ältere Kommentare anzeigen
So I have a matrix and I have to convert a column of numbers into words... the same word. How can I do it? Obviously I have to convert the matrix to a cell to add characters.
Antworten (1)
Azzi Abdelmalek
am 20 Mai 2016
A=[1 2;3 4]
B=arrayfun(@num2str,A,'un',0)
5 Kommentare
victoria camilleri
am 20 Mai 2016
Azzi Abdelmalek
am 20 Mai 2016
To make things clear, post an example with the expected result
victoria camilleri
am 20 Mai 2016
Bearbeitet: Azzi Abdelmalek
am 20 Mai 2016
Azzi Abdelmalek
am 20 Mai 2016
A=[60 10 2
50 10 2
40 10 2
20 10 2]
out=num2cell(A)
out(:,3)={'word'}
victoria camilleri
am 20 Mai 2016
Kategorien
Mehr zu Numeric Types finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!