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(adsbygoogle = window.adsbygoogle || []).push({});

user=input('blahblahblah [y/n]: ','s');

while user=='y' || user='Y' || user=='yes' || user=='Yes'

MATLAB recommends I change to strcmp. Why is this?

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Why use strcmp instead of = ? [MATLAB]

Loading...

Similar Threads for strcmp instead MATLAB |
---|

MATLAB MATLAB: forces acting on an object |

MATLAB Matlab histogram |

MATLAB Sovling Bernoulli's differential equation in matlab? |

MATLAB Matlab-like software |

MATLAB Matlab data into bins |

**Physics Forums | Science Articles, Homework Help, Discussion**