| MATLAB Central > MATLAB Newsreader > range interval & switch case |
|
|
|
Hi, in math we do [8,2) to say 8 <= x < 2 |
|
You could use a switch for this: |
|
Hi Mat, thanks. |
|
"John Wong" <gokoproject@gmail.com> wrote in message |
|
I just realized that you may not know about elseif. Is that true? If so, I am sorry I wasn't more explicit earlier. |
|
"Matt Fig" <spamanon@yahoo.com> wrote in message <h9hpgq$8ik$1@fred.mathworks.com>... |
|
Subject: range interval & switch case From: Steven Lord Date: 25 Sep, 2009 14:02:39 Message: 7 of 15 |
|
|
|
"Steven Lord" <slord@mathworks.com> wrote in message |
|
hi steve and matt |
|
I still think the logic could use some work, and an if-elseif construct might make the code neater, but this produces a graph. |
|
hi matt thanks for the help |
|
I don't understand that. Try this: Put all of the code I posted into a new M-File (type the word 'edit' with no quotes, at the command line) then save it as mattfig. Now from the command line, type: mattfig. What happens? |
|
hi Matt. |
|
You didn't happen to make a new M-File with the name 'plot' did you? If you type: |
|
"Matt Fig" <spamanon@yahoo.com> wrote in message <h9ltcq$5p9$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 |
| switch | Sprinceana | 26 Sep, 2009 04:53:34 |
| case | Sprinceana | 26 Sep, 2009 04:53:34 |
