Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: How can find Intersection of this two Plot

Subject: How can find Intersection of this two Plot

From: ehsan mirrahimi

Date: 22 Sep, 2007 19:58:41

Message: 1 of 9

dear friends
I want to find intersection of this plots:

http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
tml

the blue one plot is a .mat file and the red plot is:

Th=.1453*ones(527,1);
plot(Th);

I need the source to find the intersection points.
thanks.

Subject: How can find Intersection of this two Plot

From: Yang Zhang

Date: 22 Sep, 2007 20:19:33

Message: 2 of 9

"ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote in
message <fd3s5h$4av$1@fred.mathworks.com>...
> dear friends
> I want to find intersection of this plots:
>
> http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> tml
>
> the blue one plot is a .mat file and the red plot is:
>
> Th=.1453*ones(527,1);
> plot(Th);
>
> I need the source to find the intersection points.
> thanks.


Hi,
Suppose your blue line data is stored in vector a, then

intersection = find((a - 1)== 0);

HTH,
Yang

Subject: How can find Intersection of this two Plot

From: Doug Schwarz

Date: 22 Sep, 2007 20:30:23

Message: 3 of 9

In article <fd3s5h$4av$1@fred.mathworks.com>,
 "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote:

> dear friends
> I want to find intersection of this plots:
>
> http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> tml
>
> the blue one plot is a .mat file and the red plot is:
>
> Th=.1453*ones(527,1);
> plot(Th);
>
> I need the source to find the intersection points.
> thanks.


I think my intersections.m will work out for you:

<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId
=11837&objectType=FILE>

(watch for wrapped URL)

Something like

  [x,y] = intersections(x_blue,y_blue,[0 600],[0.1453 0.1453]);

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: How can find Intersection of this two Plot

From: ehsan mirrahimi

Date: 23 Sep, 2007 01:11:47

Message: 4 of 9

"Yang Zhang" <zhyang99@hotmail.com> wrote in message
<fd3tcl$it2$1@fred.mathworks.com>...
> "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote
in
> message <fd3s5h$4av$1@fred.mathworks.com>...
> > dear friends
> > I want to find intersection of this plots:
> >
> >
http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> > tml
> >
> > the blue one plot is a .mat file and the red plot is:
> >
> > Th=.1453*ones(527,1);
> > plot(Th);
> >
> > I need the source to find the intersection points.
> > thanks.
>
>
> Hi,
> Suppose your blue line data is stored in vector a, then
>
> intersection = find((a - 1)== 0);
>
> HTH,
> Yang



Dear Yang
but my answer:

Intersection=find((R_detect_squared-1)==0)

Intersection =

   Empty matrix: 0-by-1

why??


Subject: How can find Intersection of this two Plot

From: ehsan mirrahimi

Date: 23 Sep, 2007 01:15:13

Message: 5 of 9

Doug Schwarz <see@sig.for.address.edu> wrote in message
<see-90B0A1.16305022092007@news.frontiernet.net>...
> In article <fd3s5h$4av$1@fred.mathworks.com>,
> "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote:
>
> > dear friends
> > I want to find intersection of this plots:
> >
> >
http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> > tml
> >
> > the blue one plot is a .mat file and the red plot is:
> >
> > Th=.1453*ones(527,1);
> > plot(Th);
> >
> > I need the source to find the intersection points.
> > thanks.
>
>
> I think my intersections.m will work out for you:
>
>
<http://www.mathworks.com/matlabcentral/fileexchange/loadFi
le.do?objectId
> =11837&objectType=FILE>
>
> (watch for wrapped URL)
>
> Something like
>
> [x,y] = intersections(x_blue,y_blue,[0 600],[0.1453
0.1453]);
>
> --
> Doug Schwarz
> dmschwarz&ieee,org
> Make obvious changes to get real email address.


Your m file link is invalid!!!!

Subject: How can find Intersection of this two Plot

From: Doug Schwarz

Date: 23 Sep, 2007 01:46:21

Message: 6 of 9

In article <fd4en1$cl0$1@fred.mathworks.com>,
 "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote:

> Doug Schwarz <see@sig.for.address.edu> wrote in message
> <see-90B0A1.16305022092007@news.frontiernet.net>...
> > In article <fd3s5h$4av$1@fred.mathworks.com>,
> > "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote:
> >
> > > dear friends
> > > I want to find intersection of this plots:
> > >
> > >
> http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> > > tml
> > >
> > > the blue one plot is a .mat file and the red plot is:
> > >
> > > Th=.1453*ones(527,1);
> > > plot(Th);
> > >
> > > I need the source to find the intersection points.
> > > thanks.
> >
> >
> > I think my intersections.m will work out for you:
> >
> >
> <http://www.mathworks.com/matlabcentral/fileexchange/loadFi
> le.do?objectId
> > =11837&objectType=FILE>
> >
> > (watch for wrapped URL)
> >
> > Something like
> >
> > [x,y] = intersections(x_blue,y_blue,[0 600],[0.1453
> 0.1453]);
> >
> > --
> > Doug Schwarz
> > dmschwarz&ieee,org
> > Make obvious changes to get real email address.
>
>
> Your m file link is invalid!!!!

No, it's not. I said to watch out for the URL being wrapped. you may
have to paste the two parts separately into your browser. Try again,
please:

<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId
=11837&objectType=FILE>

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: How can find Intersection of this two Plot

From: Yang Zhang

Date: 23 Sep, 2007 03:32:17

Message: 7 of 9

"ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote in
message <fd4egj$acu$1@fred.mathworks.com>...
> "Yang Zhang" <zhyang99@hotmail.com> wrote in message
> <fd3tcl$it2$1@fred.mathworks.com>...
> > "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote
> in
> > message <fd3s5h$4av$1@fred.mathworks.com>...
> > > dear friends
> > > I want to find intersection of this plots:
> > >
> > >
> http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> > > tml
> > >
> > > the blue one plot is a .mat file and the red plot is:
> > >
> > > Th=.1453*ones(527,1);
> > > plot(Th);
> > >
> > > I need the source to find the intersection points.
> > > thanks.
> >
> >
> > Hi,
> > Suppose your blue line data is stored in vector a, then
> >
> > intersection = find((a - 1)== 0);
> >
> > HTH,
> > Yang
>
>
>
> Dear Yang
> but my answer:
>
> Intersection=find((R_detect_squared-1)==0)
>
> Intersection =
>
> Empty matrix: 0-by-1
>
> why??
>
>
Hi,

I forgot the .1453 term:

intersection = find(abs(a - .1453)< 0.001);

Hopefully this time you got something make sense.

Yang

Subject: How can find Intersection of this two Plot

From: ehsan mirrahimi

Date: 23 Sep, 2007 06:30:40

Message: 8 of 9

Doug Schwarz <see@sig.for.address.edu> wrote in message
<see-22955D.21464822092007@news.frontiernet.net>...
> In article <fd4en1$cl0$1@fred.mathworks.com>,
> "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com> wrote:
>
> > Doug Schwarz <see@sig.for.address.edu> wrote in
message
> > <see-90B0A1.16305022092007@news.frontiernet.net>...
> > > In article <fd3s5h$4av$1@fred.mathworks.com>,
> > > "ehsan mirrahimi" <ehsan.mirrahimi@mathworks.com>
wrote:
> > >
> > > > dear friends
> > > > I want to find intersection of this plots:
> > > >
> > > >
> >
http://imageupload.com/~imageupl/show.php/25075_cross.jpg.h
> > > > tml
> > > >
> > > > the blue one plot is a .mat file and the red plot
is:
> > > >
> > > > Th=.1453*ones(527,1);
> > > > plot(Th);
> > > >
> > > > I need the source to find the intersection points.
> > > > thanks.
> > >
> > >
> > > I think my intersections.m will work out for you:
> > >
> > >
> >
<http://www.mathworks.com/matlabcentral/fileexchange/loadFi
> > le.do?objectId
> > > =11837&objectType=FILE>
> > >
> > > (watch for wrapped URL)
> > >
> > > Something like
> > >
> > > [x,y] = intersections(x_blue,y_blue,[0 600],
[0.1453
> > 0.1453]);
> > >
> > > --
> > > Doug Schwarz
> > > dmschwarz&ieee,org
> > > Make obvious changes to get real email address.
> >
> >
> > Your m file link is invalid!!!!
>
> No, it's not. I said to watch out for the URL being
wrapped. you may
> have to paste the two parts separately into your
browser. Try again,
> please:
>
>
<http://www.mathworks.com/matlabcentral/fileexchange/loadFi
le.do?objectId
> =11837&objectType=FILE>
>
> --
> Doug Schwarz
> dmschwarz&ieee,org
> Make obvious changes to get real email address.


Ok I excute your m file but I think it works wrong!
eamine my data with your mfile plese .
thanks.

http://www.4shared.com/file/24851274/30374dd3/a_online.html


Subject: How can find Intersection of this two Plot

From: Doug Schwarz

Date: 23 Sep, 2007 20:07:35

Message: 9 of 9

ehsan mirrahimi wrote:
>
> Ok I excute your m file but I think it works wrong!
> eamine my data with your mfile plese .
> thanks.
>
> http://www.4shared.com/file/24851274/30374dd3/a_online.html

Okay, here's what I did and all looks as I expect. If you want something
else please let me know and be specific.

   load a.mat
   x = 1:527;
   x2 = [1 527];
   y2 = [0.1453 0.1453];
   [x0,y0] = intersections(x,R_detect_squared,x2,y2);
   plot(x,R_detect_squared,x2,y2,x0,y0,'o')


--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
find intersection ehsan mirrahimi 22 Sep, 2007 16:00:21
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics