Matrix problem with my vectors

조회 수: 1 (최근 30일)
Daniel Sode
Daniel Sode 2019년 4월 17일
답변: Andrei Bobrov 2019년 4월 18일
I am tryin to create a vector 0f angles in incrments of 5 from -5 to 25 I have another vector N with 14 elements I am really lost

답변 (2개)

Adam Danz
Adam Danz 2019년 4월 17일
편집: Adam Danz 2019년 4월 18일
"I am tryin to create a vector of angles in incrments of 5 from -5 to 25"
angles = -5 : 5 : 25
Result:
angles =
-5 0 5 10 15 20 25
Let me know if that doesn't cover your question.

Andrei Bobrov
Andrei Bobrov 2019년 4월 18일
theta = (-5:5:25)';%+
n = numel(theta);
N = [-0.906 1.43 2.78 4.20 5.03 5.28 -2.49 0.889 4.16 7.71 11.0 7.30 12.7]*4.45;
FN_c = N -(3.9*(1-cosd(theta)));
D = FN_c.*sind(theta);
S = 96/(1550);
b = 14.5/(39.4);
AR = b^2/S;
L = FN_c.*cosd(theta);
dp = 1.225;
pz = cat(3,1.6, 4.4)*248.8;
V = sqrt(2*pz/dp);
CL = L/0.5*dp.*V.^2*S;
CL_TH = 2*pi*theta/(1+2/AR);
CD = D./(0.5*V.^2*S);
CD_i = CL.^2/pi*AR;
figure
subplot(4,2,1)
plot(theta,CL(:,:,1))
title('CL and pz(1)')
subplot(4,2,2)
plot(theta,CL(:,:,2))
title('CL and pz(2)')
subplot(4,2,7)
plot(theta,CL_TH)
title('CL_TH')
subplot(4,2,3)
plot(theta,CD(:,:,1))
title('CD and pz(1)')
subplot(4,2,4)
plot(theta,CD(:,:,2))
title('CD and pz(2)')
subplot(4,2,5)
plot(theta,reshape(CD_i,n,[]))
title('CD_i and pz(1)')
subplot(4,2,6)
plot(theta,reshape(CD_i,n,[]))
title('CD_i and pz(2)')
grid, xlabel('angle of attack'), ylabel('Coefficient');

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by