필터 지우기
필터 지우기

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

조회 수: 4 (최근 30일)
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.

답변 (1개)

VBBV
VBBV 2022년 12월 2일
syms a b
strEquation = "a*b";
disp(strEquation)
a*b
  댓글 수: 4
VBBV
VBBV 2022년 12월 5일
syms a b
strEquation = "axb"; %use the x symbol in place of *
disp(strEquation)
axb

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by