The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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 ]

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


Let's say I have this interval :


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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.