Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

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

1 visualización (últimos 30 días)
Cauli Vilela Ferreira
Cauli Vilela Ferreira el 2 de Jul. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by