How to find an intersection between two lines on a plot?
Afficher commentaires plus anciens
I have this code,
for P = [0; 1000; 2000; 6000; 10000; 12000; 12900; 13400; 13600; 13800; 14000; 14400; 15200; 16800; 18400; 20000; 22400];
Elon = [0; 0.0002; 0.0006; 0.0019; 0.0033; 0.0039; 0.0043; 0.0047; 0.0054; 0.0063; 0.0090; 0.0102; 0.0130; 0.0230; 0.0336; 0.0507; 0.1108];
d = 0.505;
r = d/2;
Area = pi*r^2;
GL = 2;
Stress = P/Area
Strain = Elon/GL
plot(Strain,Stress,'-x')
axis([0 0.06 0 120000]);
grid;
grid minor;
title('Stress vs. Strain')
xlabel('Strain')
ylabel('Stress, psi')
hold on;
text(0.00195,5.991e+04,'\leftarrow Proportional limit');
Proprtinal_limit = Stress(6)
E = (Stress(6)-Stress(1))./(Strain(6)-Strain(1))
refline(E,-30724)
axis([0 0.06 0 120000]);
end
I need to find the X and Y coordinates for the intersection of "Plot" and "refline".
2 commentaires
Walter Roberson
le 7 Sep 2019
https://www.mathworks.com/matlabcentral/fileexchange/11837-fast-and-robust-curve-intersections and similar in the File Exchange.
darova
le 7 Sep 2019
Or use polyxpoly() if you have a toolbox
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Stress and Strain dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!