variables and numbers in msgbox

44 views (last 30 days)
nkumar
nkumar on 7 Mar 2013
Commented: samy youssef on 14 Mar 2015
i have two values
A=89.6
B=15.4
now i want to display this in msgbox as
The value of A is 89.6
the values of B is 15.4(in next line)
plz assist
  1 Comment
samy youssef
samy youssef on 14 Mar 2015
where is ur comment on the given answer nkumar?

Sign in to comment.

Accepted Answer

Sean de Wolski
Sean de Wolski on 7 Mar 2013
msgbox(sprintf('A = %2.3g\nB = %2.3g',A,B),'AB')
And for more info:
doc sprintf

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!