MATLAB talk:Logical Masks

From PrattWiki
Revision as of 05:37, 20 September 2012 by DukeEgr93 (talk | contribs)
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 (talkcontribs)

  • Absolutely - see in the GPA example how there are things like
    (70<=Grade & Grade<80) * (2.0)
    
    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)