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

조회 수: 1 (최근 30일)
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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by