MATLAB talk:Logical Masks
Jump to navigation
Jump to search
- Hi this is Everett Loving.
When a logical mask is scanning a matrix of numbers, is it possible to ask the mask to check for two conditions? For example, something like:
variable = (condition && condition) .*value +... (condition) .....
—Preceding unsigned comment added by ejl23 (talk • contribs)
- Absolutely - see in the GPA example how there are things like that has two conditions. Note, though, that masks don't really "scan" so much as they perform all calculations at once. DukeEgr93 01:37, 20 September 2012 (EDT)
(70<=Grade & Grade<80) * (2.0)
- Absolutely - see in the GPA example how there are things like