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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!