- #1
nickadams
- 182
- 0
If a user answers "yes", "Yes", "y", or "Y" to an input question, I want to enter the while loop. But when I tried to use
user=input('blahblahblah [y/n]: ','s');
while user=='y' || user='Y' || user=='yes' || user=='Yes'
MATLAB recommends I change to strcmp. Why is this?
user=input('blahblahblah [y/n]: ','s');
while user=='y' || user='Y' || user=='yes' || user=='Yes'
MATLAB recommends I change to strcmp. Why is this?