Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
what can i do here to not have to repeat the highlighted code?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
what can i do here to not have to repeat the highlighted code? this code: (WingSt.CL = WingSt.AoA + DiscSt.N ...)
I need to get two vectors one with ('VectorN' varying and 'VectorA' being equal); and another with ('VetorA' varying' and 'VetorN being equal')
N = 20; % number of discretization points
in = 4; % number of inputs
VetorN = fix( (N * sqrt(2) .^ (0 : in) ) );
ix = mod(VetorN, 2) ~= 0;
VetorN(ix) = VetorN(ix) + 1;
for k = 1 : numel(VetorN)
DiscSt.N(k) = VetorN(k);
z = 2; % AoA variation
w = 4; % ( w + 1 ) = number of repetition
VetorA = ( 0 + ( z *( 0 : w ) ) );
WingSt.AoA = deg2rad( 5 );
if k == length(VetorN)
for j = 1 : numel( VetorA )
DiscSt.N = N;
WingSt.AoA(j) = deg2rad( VetorA(j) ); % input angle of attack
!!WingSt.CL = WingSt.AoA + DiscSt.N!!
...
CL = WingSt.CL
end
break
end
!!WingSt.CL = WingSt.AoA + DiscSt.N!!
...
CL1 = WingSt.CL
end
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!