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: Creating Booleans from Vectors
Replies: 5   Last Post: Sep 17, 2013 11:23 PM

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
Creating Booleans from Vectors
Posted: Sep 17, 2013 4:37 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

Suppose I have two vectors:

x = [1 3 8 10 11];
y = [2 6 9 15];

and I've created a vector

xy_ordered = [1 2 3 6 8 9 10 11 15];

and I want to make a couple 'cuts';
cX = [1 0 1 0 1 0 1 1 0]
cY = [0 1 0 1 0 1 0 0 1]; %by definition the is ~cX..

What's the quick way to identify and create these cX and cY from x, y, and xy_ordered?

Thank you in advance!

M.A.B.



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.