how to find point of intersection of two curves

2 views (last 30 days)
arun p
arun p on 4 Sep 2021
Edited: Matt J on 4 Sep 2021
x = 0:1:1200;
y1 = (6871)*x.^(-1);
y2 = 1.5*log(x)-3.417;

Accepted Answer

Matt J
Matt J on 4 Sep 2021
Edited: Matt J on 4 Sep 2021
x = 0:1:1200;
y1 = (6871)*x.^(-1);
y2 = 1.5*log(x)-3.417;
[~,imin]=min(abs(y1-y2));
xint=fzero(@(x) 1.5*log(x)-3.417 - (6871)*x.^(-1), x(imin))
xint = 991.2737
%verify
plot(x,y1,x,y2,[xint,xint],[6.6,7.5],'--');
xlim([980,1000])

More Answers (0)

Tags

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!