arbitrary point with the know slope to another line to specify point on that second line

1 回表示 (過去 30 日間)
Ceren Ecemsu Varan
Ceren Ecemsu Varan 2022 年 6 月 23 日
回答済み: Sam Chak 2022 年 6 月 24 日
I have two lines, one of them is operating line and the other is equilibrium line. I need to specify an arbitary point on a operating line, then with the known slope I need to draw a line that stops on the equilibrium line and obtain the point on equlibrium line. How can I achieve that?
I need it for separation process course to find interface mole fraction
  5 件のコメント
Sam Chak
Sam Chak 2022 年 6 月 24 日
OK I guess you want to find the intersections between multicolored lines and the thick blue line. Right?
If so, can you provide the parameters of line equation?
y = m*x + c
Ceren Ecemsu Varan
Ceren Ecemsu Varan 2022 年 6 月 24 日
the main red line is operating line
the main blue line is equilibrium line
and I want to know the points that end on the blue line for that 10 interface line

サインインしてコメントする。

回答 (1 件)

Sam Chak
Sam Chak 2022 年 6 月 24 日
Since you are unable to provide additional info, perhaps you can do something like this:
% Analysis
x1 = linspace(0, 14e-3, 1401);
y1 = 220/7*x1; % blue line
x2 = linspace(0, 5e-3, 501);
y2 = 64*x2 + 0.03; % red line
plot(x1, y1, 'LineWidth', 1.5), hold on,
plot(x2, y2, 'LineWidth', 1.5)
x3 = linspace(2.5e-3, 5e-3, 251);
y3 = 0.28 - 36*x3; % orange line
plot(x3, y3, 'LineWidth', 1.5), hold off, axis([-3/1000 15/1000 -0.25 0.55]), grid on
% find intersection between orange line and blue line
f1 = @(x) 0.28 - 36*x - 220/7*x;
x0 = 4/1000; % initial guess (near the intersection)
interX = fzero(f1, x0)
interX = 0.0042
% New Plot
x4 = linspace(2.5e-3, interX, 251);
y3 = 0.28 - 36*x4;
plot(x1, y1, 'LineWidth', 1.5), hold on,
plot(x2, y2, 'LineWidth', 1.5)
plot(x4, y3, 'LineWidth', 1.5), hold off, axis([-3/1000 15/1000 -0.25 0.55]), grid on

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by