フィルターのクリア

How to get a variable to change for a specific interval?

3 ビュー (過去 30 日間)
Austen Thomas
Austen Thomas 2018 年 1 月 25 日
回答済み: Torsten 2018 年 1 月 26 日
For the code attached part C is where I am having the problem. Part C puts out the same values as part B. The difference between part B and C is that for C the variable AR is supposed to go over the interval i 1:10 but it appears not to be. How would i correct this?
  2 件のコメント
Brandon  Madsen
Brandon Madsen 2018 年 1 月 25 日
What do you mean by "go over"?
Austen Thomas
Austen Thomas 2018 年 1 月 25 日
run through the interval of 1 though 10. so it runs the code for 1 2 3 ... ect

サインインしてコメントする。

回答 (1 件)

Torsten
Torsten 2018 年 1 月 26 日
k = -12:1:20;
AR = 1:1:10;
AOA = zeros(length(k));
CL = zeros(length(k),length(AR));
for j = 1:length(AR)
a(j) = (pi/180)*(a0/(1+(a0)/(pi*e*AR(j))));
for i = 1:length(k)
AOA(i) = k(i);
CL(i,j) = a(j)*(A0A(i) - alp0);
fprintf(fid,'%8.4f %8.4f\n',AOA(i),CL(i,j));
end
end
Best wishes
Torsten.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by