Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

what can i do here to not have to repeat the highlighted code?

1 view (last 30 days)
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

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!