Switch case (how to use for case insensitive string check)

This might be a dumb question, but i did not seem to find an answer.
I´m using switch statement like this,
switch str
case {'power','POWER','Power'.....}
is there any way for me write the string for comparison in the case statement only once, but which also covers all case combinations something like, strcmpi
Thanks in advance. Best Regards, Hss

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

产品

标签

提问:

2012-2-17

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by