How to display an equation in MATLAB?

조회 수: 33(최근 30일)
sohail quadri
sohail quadri 2020년 11월 24일
답변: Prabhanjan Mentla 2020년 11월 27일
How do i display an equation in msgbox or in other way?
  댓글 수: 1
dpb
dpb 2020년 11월 24일
How about
msgbox('y=mx+b')
?

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

답변(1개)

Prabhanjan Mentla
Prabhanjan Mentla 2020년 11월 27일
Hi,
As dbp suggested, you could use directly use equation in msgbox. However, sprintf inside the msgbox could be used something like below.
h = msgbox(sprintf('The equation is y=%dx+%d', m, c));
For more information on msgbox, you may refer to below links.
Hope this helps.

Community Treasure Hunt

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

Start Hunting!

Translated by