Borrar filtros
Borrar filtros

Is there a way of getting displayFormula to print multiplication (×) symbols in an equation?

4 visualizaciones (últimos 30 días)
Example code:
syms a b
strEquation = "a*b";
displayFormula(strEquation)
Live editor output:
a b
Desired ouput:
a × b
I realise there may be a text based way of achieving this with the simple example above, but I'd ideally like it to work for larger, more complex formulae, whilst retaining the formatting style of displayFormula.

Respuestas (1)

VBBV
VBBV el 2 de Dic. de 2022
syms a b
strEquation = "a*b";
disp(strEquation)
a*b
  4 comentarios
VBBV
VBBV el 5 de Dic. de 2022
syms a b
strEquation = "axb"; %use the x symbol in place of *
disp(strEquation)
axb

Iniciar sesión para comentar.

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by