Why stays i always the same?

1 回表示 (過去 30 日間)
Claudia
Claudia 2015 年 6 月 18 日
編集済み: Jan 2015 年 6 月 18 日
Hey there!
I am struggling with a for loop.
for i=1:5
T_poly(i)=223+50*i
cp_poly(i)=-5.725e-16*T_poly(i)^5+4.589e-12*T_poly(i)^4-1.419e-08*T_poly(i)^3+2.145e-05*T_poly(i)^2-0.0165*T_poly(i)^1+6.185
end
if I can changed the i=1:32 to i=1:5 and the lenght of the T_poly(i) still stays 32. Why that? It also says that the lenght of cp_poly and T_poly is not the same.
Can you please help me?
Thank you a lot
  1 件のコメント
Stephen23
Stephen23 2015 年 6 月 18 日
Don't forget to clear the workspace!

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

採用された回答

Claudia
Claudia 2015 年 6 月 18 日
Found the answer by my self. You first have to delete the workspace.

その他の回答 (0 件)

カテゴリ

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