Matrix problem with my vectors

1 view (last 30 days)
Daniel Sode
Daniel Sode on 17 Apr 2019
Answered: Andrei Bobrov on 18 Apr 2019
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

Answers (2)

Adam Danz
Adam Danz on 17 Apr 2019
Edited: Adam Danz on 18 Apr 2019
"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 on 18 Apr 2019
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');

Community Treasure Hunt

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

Start Hunting!