+ Post New Thread
Results 1 to 5 of 5

22nd September 2007, 21:14 #1
 Join Date
 Mar 2007
 Posts
 49
 Helped
 5 / 5
 Points
 1,459
 Level
 8
matlab intersection
Dear friend
I want to find the intersection of this plot:
the blue one is a .mat file and the other on is:
Th=.1453*ones(527,1);
plot(Th)
Ineed the source to find these intersection points:
thanks.

Advertisement

23rd September 2007, 03:43 #2
 Join Date
 Apr 2002
 Location
 USA
 Posts
 3,942
 Helped
 663 / 663
 Points
 32,456
 Level
 44
matlab find intersection
I'm not sure what output format you need, but maybe you can use my small example:
https://www.edaboard.com/ftopic269296.html#899375
It outputs a list of array indexes identifying the zerocrossing points.
You can easily change it from zerocrossing to 0.1453crossing.

Advertisement

24th September 2007, 16:59 #3
 Join Date
 Mar 2002
 Posts
 509
 Helped
 72 / 72
 Points
 5,822
 Level
 18
line intersection matlab
It looks simple.
a= 0.18 % The value of the red line.
ii=1 % Counter
for i=1:550
b(i) = Blue line(i)
if b(i)==a
c(ii) = i;
ii=ii+1;
end if
end
c % c is an array of of the "X" values where the red & Blue lines are equal.
% This assumes that the red and blue lines have data points at the
% intersection.
This is the general idea, you will have to make sure the xaxis resolution is high
enough to assure red is = blue at those points.
ie. if blue(330) =.178 & blue(331)= .181 then this will not work (Assuming
red=.180)
Hope this helps

Advertisement

24th September 2007, 19:03 #4
 Join Date
 Mar 2007
 Posts
 49
 Helped
 5 / 5
 Points
 1,459
 Level
 8
matlab line intersection
yea I find the intersection points.
in fact I want to find the intersection points.
after that I should test that if the distance between two points is less than 0.25 or not?
if this condition was true I should save the first point and eliminte the other one and if this condition was wrong I should save each of them.
then I should Reconstruct the blue one signal.
what could be the reconsruction Algorithm?
more accurate I after finding the intersection points I want to reconstruct the blue one plot without smaller segment.
Can you help me?
thanks.

5th November 2009, 01:55 #5
 Join Date
 Nov 2009
 Posts
 1
 Helped
 0 / 0
 Points
 553
 Level
 5
Re: How can find intersection of this plots in Matlab
i need your help, too. (H1=0.25, B=0.58, z1 and z2 are changing between 0.1 and 1)
H1=input('H1 degerini giriniz:');
B=input('B degerini giriniz:');
z=((1B)/H1):0.1:B/H1;
FA=H1*z.^2+z.*B;
FO=z.*[(1B)+z.*H1];
plot(FA,FO);
hold on
z1=input('kritik frenleme oranini giriniz:');
line([0 z1],[z1 0]);
z2=input('yol sartini giriniz:');
line([0 z2],[z2 0]);
this is from an mfile. i want to plot one more line that starts at [0 0] and ends at the intersection point of curve and line(z2). but i want this line to change when the other values change. because the intersection point changes for all the different values of z2. I hope you can do that. thank you.
+ Post New Thread
Please login