| MATLAB Central > MATLAB Newsreader > simple if-then-else question |
|
|
|
I have a fairly long (13956 X 1) array as a component of a struct that contains a few negative values. I need to replace the negative values with zero. I thought that this would be a good case for an if statement. However, I must be using the wrong syntax. |
|
Subject: simple if-then-else question From: Walter Roberson Date: 20 Jan, 2009 18:59:33 Message: 2 of 6 |
|
Kirk wrote: |
|
If the array is part of a struct, you need to address that field. |
|
"Kirk" <kwythers.nospam@umn.edu> wrote in message <gl56em$51p$1@fred.mathworks.com>... |
|
|
|
"Kirk" <kwythers.nospam@umn.edu> wrote in message <gl5bv1$rv2$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.
