フィルターのクリア

I have the following m file andI am getting an "Index exceeds array bounds". I am trying to figure out why.

1 回表示 (過去 30 日間)
The objective of this is todetermine the rate of change of temperature for 2881 timesteps. I am trying to run a for loop for each time step but I am getting an error saying that the index exceeds the array bounds.
Error in Shivam723 (line 164)
Tempchange1(i) = (a1*J_sun*Asun + e1*J_ear*Aearth -
e1*sigma*TPanel1(i-1)*Asat)/(satmass*sp_heat);
  2 件のコメント
madhan ravi
madhan ravi 2018 年 12 月 2 日
sat.sun_pos_I(i-1,1)? whats the value of it?
N/A
N/A 2018 年 12 月 2 日
All the variables are loaded into this file have a look

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

採用された回答

N/A
N/A 2018 年 12 月 2 日
I found the solution.
TPanel(1:6) was defined early on.
The issue was that while the initial TPanel(i-1) value was being assesed, the TPanel (i-1) wasn't being saved for the next iteration. Hence why it stopped after the first loop. Correcting this error, and a few other small ones made the code work as intended.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by