how can i find the intersection point between the two curves and the minimum point to the other curve?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
mohamed asran
am 26 Okt. 2019
Beantwortet: mohamed asran
am 9 Nov. 2020
k1=10^-4;k2=2*10^5
k2 = 200000
d=0.08;
a=50*10^-6:1*10^-6:100*10^-6;
cr =k1./a;
cf =k2*d.*a;
ctot =cr+cf;
plot(a,cr,a,cf,a,ctot)
title('optimal')
xlabel('cross section area')
ylabel('costs')
legend('cr','ctot','cf')
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 26 Okt. 2019
Do you want the (harder) analytical answer (like from the formula) or the (easier) digital answer from the digitized vectors, like
distances = abs(cf-cr)
[minDistance, indexAtMin] = min(distances);
y1AtMin = cf(indexAtMin)
y2AtMin = cr(indexAtMin)
aAtMin = a(indexAtMin)
hold on;
line([aAtMin, aAtMin], ylim);
4 Kommentare
Image Analyst
am 26 Okt. 2019
MATLAB is NOT needed for an analytical solution. Haven't you taken a calculus course yet?
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Curve Fitting Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!