arbitrary point with the know slope to another line to specify point on that second line
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Sam Chak
am 24 Jun. 2022
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
Antworten (1)
Sam Chak
am 24 Jun. 2022
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)
% 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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Annotations 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!