Help finding intersecting points

조회 수: 2 (최근 30일)
Caleb Hedin
Caleb Hedin 2021년 1월 22일
댓글: Star Strider 2021년 1월 22일
So I found a few approaches to finding intersecting points but when I tried applying them I got no results. Ideally what I would like is to find the intersecting point and have a line vertially that will be noted on the graph and to print the result as well.
This is my code so far;
clear all
clc
close all
W = 73000; %Airplane weight in lbs
Alt = 30000; %altitude given at 30000 feet
S = 950; %Area of the wing given in ft^2
AR = 5.92; %Aspect Ratio
Cd_o = 0.015; %coefficient of drag at 0 The value of 0.015 chosen for C0 _o is based on a generic value typical of streamlined, multiengine jet aircraft.
e = .9; %span efficiency factor
k_3 = 1/(pi*e*AR);
k_2 = 0;
k_1 = (1/3)*k_3;
K = k_1+k_2+k_3; %I'm not sure
V = linspace(400, 2400, 1000); %Velocity feet per second
rho = 8.9068*10^(-4); %Density at 30000 ft
C_l = ((2*W)./(rho*V.^2*S)) %coefficient of lift
C_d = Cd_o+K*(C_l).^(2) %Coefficient of drag
T_r = (1/2*rho.*V.^2.*S.*C_d) %Thrust given in lbs
D = T_r; %Thrust = Drag page 205 last paragragh
P_r = V.*T_r
T_a = 13850*2 %lb/f
P_a = V.*T_a
figure
hold on
plot(V, P_r)
plot(V, P_a)
%plot(V_intersect)

채택된 답변

Star Strider
Star Strider 2021년 1월 22일
Try this:
W = 73000; %Airplane weight in lbs
Alt = 30000; %altitude given at 30000 feet
S = 950; %Area of the wing given in ft^2
AR = 5.92; %Aspect Ratio
Cd_o = 0.015; %coefficient of drag at 0 The value of 0.015 chosen for C0 _o is based on a generic value typical of streamlined, multiengine jet aircraft.
e = .9; %span efficiency factor
k_3 = 1/(pi*e*AR);
k_2 = 0;
k_1 = (1/3)*k_3;
K = k_1+k_2+k_3; %I'm not sure
V = linspace(400, 2400, 1000); %Velocity feet per second
rho = 8.9068*10^(-4); %Density at 30000 ft
C_l = ((2*W)./(rho*V.^2*S)); %coefficient of lift
C_d = Cd_o+K*(C_l).^(2); %Coefficient of drag
T_r = (1/2*rho.*V.^2.*S.*C_d); %Thrust given in lbs
D = T_r; %Thrust = Drag page 205 last paragragh
P_r = V.*T_r;
T_a = 13850*2; %lb/f
P_a = V.*T_a;
intx_V = interp1(P_r-P_a, V, 0);
intx_Pr = interp1(V, P_r, intx_V);
figure
hold on
plot(V, P_r)
plot(V, P_a)
plot(intx_V, intx_Pr, 'sr')
hold off
text(intx_V,intx_Pr, sprintf('(%6.1f, %9.1f) \\rightarrow', intx_V,intx_Pr), 'HorizontalAlignment','right', 'VerticalAlignment','middle')
producing:
.
.
  댓글 수: 2
Caleb Hedin
Caleb Hedin 2021년 1월 22일
Very cool! Thank you!
Star Strider
Star Strider 2021년 1월 22일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Marine and Underwater Vehicles에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by