How to ask a user to select an option in Matlab? Thank You.



Hello,

I am asking to the user to select an option:

disp('1. Option 1');
disp('2. Option 2');
answer = input('Choose an option: ');

I don't want anything to happen while the user doesn't choose 1 or 2.
However I don't want to keep printing the text.

Is this possible?
How can I do this?

I am using Matlab 7.04 SP2.

Thank You,
Miguel

.



Relevant Pages

  • Standard Deviation
    ... How can I determine the standard deviation? ... I know the formula but I would like to know which function in Matlab ... Miguel ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • BUG FOUND !!! Matlab 7 SP2
    ... Pleae let me know if anybody gets the same problem! ... I use matlab 7 sp2, ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • RGB Color in Matlab
    ... How to use it in Matlab? ... I was looking at RGB vector in Matlab and all elements are between 0 ... Miguel ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Is this possible in Matlab
    ... Do you think that getting data in real time in matlab is possible? ... Miguel ... Prev by Date: ...
    (comp.soft-sys.matlab)
  • Re: Export Array from Matlab. Please Help. Tried E
    ... > Miguel Dias Moura wrote: ... >> Christopher Hulbert wrote: ... I don't have access to my DLL code) ... >> I believe I need to transform my input array in Matlab in order ...
    (comp.soft-sys.matlab)