1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB message box help

  1. Apr 28, 2010 #1
    1. The problem statement, all variables and given/known data
    In the ABC msgbox I would like the variable 'score' to appear after 'Your score was'. How do I do this?


    2. Relevant equations
    %tells the user their overall tv knowledge
    score=A+B+C;
    title1='Your TV Knowledge';
    if ((A+B+C)<=24)&&((A+B+C)>=18)
    ABC=msgbox('You are a tv expert. Your score was ');
    elseif ((A+B+C)<18)&&((A+B+C)>=9)
    ABC=msgbox('You know a lot about your favorite shows, but don''t know that much about others. Your score was ');
    elseif ((A+B+C)<9)&&((A+B+C)>=0)
    ABC=msgbox('You rarely watch tv. You need to brush up on your tv knowledge. Your score was ');
    end
     
  2. jcsd
  3. Apr 29, 2010 #2
    Try this:

    ABC = msgbox(['You are a tv expert. Your score was ', num2str( score )] );
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: MATLAB message box help
  1. Help with matlab (Replies: 7)

  2. MATLAB help (Replies: 2)

Loading...