Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Multiplying Double and a Logical
Replies: 5   Last Post: Jun 21, 2012 10:25 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Michael

Posts: 11
Registered: 6/18/12
Multiplying Double and a Logical
Posted: Jun 18, 2012 7:09 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello all. This is my first post and this may be a silly question, but I googled the shit out of this to no avail...

I have an array with some NaNs (which is a double), the array is also, therefore, a double). I'd like to (point-wise-.*) multiply this with another array (equal dimension) that is a logical.

I don't mind changing classes of anything. I'm just frustrated not knowing how to deal with NaNs, they're helpful because I have data to plot and NaNs don't give an error if data doesn't quite match up.

Essentially I'm trying to plot something like [ 1 2 3 NaN] with [ 1 3 5 7] (as crude examples). When plotting I'd only get three points (exactly as I want). But I'm making a 'cut' in the data by multiplying a logical (the cut-composed of 1's and 0's) and a double (the actual data containing some NaNs).

I appreciate any help you have!

-Michael



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.