is it possible to do what is in the code below?
Info
This question is closed. Reopen it to edit or answer.
Show older comments
is it possible to do what is in the code below? marked on '!!'
for k = 1 : numel(VetorN)
DiscSt.N(k) = VetorN(k);
z = 2;
VetorA = ( 0 + ( z *( 0 : in ) ) );
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
end !!%% this end for 'if'!!
WingSt.CL = WingSt.AoA + DiscSt.N;
C = [ 1 1 WingSt.AoA 1 1];
if k == length(VetorN)
break
end
end !!% !!this end for 'for'!!
CL = WingSt.CL;
end
CL1 = WingSt.CL
C
5 Comments
dpb
on 3 Jul 2020
That way, absolutely not.
What are you trying to accomplish?
Cauli Vilela Ferreira
on 3 Jul 2020
Rik
on 3 Jul 2020
I'm not sure you can avoid copying code to accomplish this.
Cauli Vilela Ferreira
on 3 Jul 2020
Image Analyst
on 3 Jul 2020
Try typing control-a (to select all text) then control-i (to fix the indenting). That will alert you to missing end statements and you can see whether the loops and if blocks look correct.
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!