How to convert a sym array into a string array?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
quoroy
le 23 Juil 2017
Commenté : Walter Roberson
le 2 Juin 2021
I have very long arrays of symbolic variables which I need to convert to cell arrays of strings: For example, turning this:
syms x y u
q = [x y u]
into this:
qs = {'x' 'y' 'u'}
something like num2string() but with syms? I'd appreciate any help, thanks.
0 commentaires
Réponse acceptée
Walter Roberson
le 23 Juil 2017
qc = arrayfun(@char, q, 'uniform', 0);
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
