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: The simplest way to intersect some intervals ?
Replies: 1   Last Post: Jun 28, 2013 6:10 AM

Advanced Search

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

Posts: 31
Registered: 5/29/13
The simplest way to intersect some intervals ?
Posted: Jun 27, 2013 5:21 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi,

Let's say I have this interval :

A=[1:4];

And this matrix :

X=[1 4;
2 3;
3 5;];

What I want is to intersect A with each line of X, each line being counted as an interval of integers : for example I want [1 4] to be processed as [1:4], [2 3] as [2:3] ect.

intersect(A,[2:3]) works of course and returns : 2 3 but it is not possible to do something like intersect(A,X). How could I do this and, if possible, without using a for loop ?



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.