matlab - How to Have Multiple or Conditions for While Loop -


i'm trying make basic while loop swing of things matlab. i'm trying create prompt ask user if today birthday , if yes it'll wish them happy birthday , if no it'll "that's bad". can make prompts appear want unless user inputs 'yes' or 'no' continually asked if today birthday. question how create loop prompt question on , on until user inputs 'yes' or 'no'.

try this:

while 1     b = input('is today birthday? ','s');     if any(strcmpi(b,{'yes','no'}))        break     end end 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -