How can I find the intersection point between 2 graphs?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi guys,
I would kindly like your help on how to find the intersection point between the yellow and blue line (at x=800), as shown below. It's probably very easy to solve, but I really have no clue how to get around this.
My code looks like this:
x = [0:10:5000]
y = Xumix1
g = Xumix2
k = [800 800]
l = [-5e6 4e6]
plot(x,y,x,g,k,l),xlabel('T'),ylabel('U'), legend('Umix1','Umix2')
0 件のコメント
採用された回答
Star Strider
2018 年 12 月 8 日
Use the interp1 function:
x = [0:10:5000];
Xumix1 = 0.12 * x.^2; % Create Data
Intersect_y = interp1(x, Xumix1, 800)
Intersect_y =
76800
I guessed at a function fo ‘Xumix1’ to illustrate the idea.
2 件のコメント
Star Strider
2018 年 12 月 8 日
My pleasure!
If my Answer helped you solve your problem, please Accept it!
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!