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 -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -