| MATLAB Central > MATLAB Newsreader > switch/case vs if/then |
|
|
|
I have a number of variables in a structure that are either 1 or 0. Right now I know how to use if/then statements to accomplish what I want, but would switch/case be quicker, more efficient, at doing the same thing? and how exaclty would I code it in? |
|
"Travis " <sinusoid2@hotmail.com> wrote in message <gu863m$nag$1@fred.mathworks.com>... |
|
"Travis " <sinusoid2@hotmail.com> wrote in message <gu863m$nag$1@fred.mathworks.com>... |
|
"Alric Gta" <alric2rei@yahoo.com> wrote in message <gu89o2$nab$1@fred.mathworks.com>... |
|
Loren wrote recently about the switch statement in Matlab, http://blogs.mathworks.com/loren/2009/04/28/switching-things-up/ |
|
"Darren Rowland" <darrenjremovethisrowland@hotmail.com> wrote in message <gu8bnp$7ie$1@fred.mathworks.com>... |
|
|
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| case | Travis | 10 May, 2009 23:34:05 |
| then switch | Travis | 10 May, 2009 23:34:05 |
| if | Travis | 10 May, 2009 23:34:04 |
Contact us at files@mathworks.com
