Converting sym to string without 'matrix....' before
Mostrar comentarios más antiguos
Hi,
I need some help to convert a symbolic array to string.
I tried with:
syms a b c
Array = [a b c];
string = char(Array);
but it returns
matrix([[a b c]]);
Is there a way to take only the string inside ? I need set it to take '[a b c]' as string.
Thanks
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 7 de Nov. de 2017
In the case of symbolic row vectors:
['[', strjoin(arrayfun(@char, Array, 'uniform', 0),', '), ']']
Categorías
Más información sobre Operations on Strings en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!