Info

此问题已关闭。 请重新打开它进行编辑或回答。

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

1 次查看(过去 30 天)
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 个)

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by