Borrar filtros
Borrar filtros

One more : Symbolic math

3 visualizaciones (últimos 30 días)
Artur M. G. Lourenço
Artur M. G. Lourenço el 24 de Sept. de 2011
see:
syms x1 x2 x3
x1 = 23/5 - x3/5 - (2*x2)/5
how to make this:
disp('x1= ',x1)
could be:
disp(['x1 = ',str2sym(x1)])
but not exist the function str2sym.
thanks advanced

Respuesta aceptada

Walter Roberson
Walter Roberson el 24 de Sept. de 2011
You want the opposite of the hypothetical str2sym : you want to convert a symbolic expression to a string. In MATLAB, strings are character arrays, so you want to convert to character.
disp(['x1 = ', char(x1)]);

Más respuestas (0)

Categorías

Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by