Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How can find intersection of this plots in Matlab

Status
Not open for further replies.

m_eh_62

Member level 2
Member level 2
Joined
Mar 5, 2007
Messages
49
Helped
3
Reputation
6
Reaction score
0
Trophy points
1,286
Activity points
1,638
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:

i25075_cross.jpg


thanks.
 

matlab find intersection

I'm not sure what output format you need, but maybe you can use my small example:
#899375

It outputs a list of array indexes identifying the zero-crossing points.
You can easily change it from zero-crossing to 0.1453-crossing.
 

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 x-axis 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
 

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.
 

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=-((1-B)/H1):0.1:B/H1;
FA=-H1*z.^2+z.*B;
FO=z.*[(1-B)+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 m-file. 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.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top