deaner00
Mechanical
- Oct 31, 2006
- 2
I want to use a switch statement with a cell array as the case expression. I know it can be used with few expressions like this:
switch lower(method)
case {'linear','bilinear'}
disp('Method is linear')
But I have a fairly lengthy switch statement where one case needs to look for numbers 4 through 100:
switch number
case {'4', '5', ...'99', '100'}.
disp('display something')
Does someone know how to make this work without writing out all 97 numbers?
Thanks for your help.
switch lower(method)
case {'linear','bilinear'}
disp('Method is linear')
But I have a fairly lengthy switch statement where one case needs to look for numbers 4 through 100:
switch number
case {'4', '5', ...'99', '100'}.
disp('display something')
Does someone know how to make this work without writing out all 97 numbers?
Thanks for your help.