convert double matrix to string

19 vues (au cours des 30 derniers jours)
Bou
Bou le 16 Mar 2014
Commenté : Bou le 16 Mar 2014
Hello,
I want to convert a double matrix to a matrix of individual cells with the number between parentheses. So I want to convert A into B.
A=
1 2 3
4 5 6
7 8 9
B=
'1' '2' '3'
'4' '5' '6'
'7' '8' '9'
Im quite new to matlab and not sure which function to use for this purpose.
Thanks in advance! Greetings Boudewijn

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 16 Mar 2014
B=arrayfun(@num2str,A,'un',0)
  1 commentaire
Bou
Bou le 16 Mar 2014
thanks!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Characters and Strings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by