フィルターのクリア

Array indices must be positive integers or logical values.

2 ビュー (過去 30 日間)
Raushan
Raushan 2023 年 10 月 27 日
コメント済み: Raushan 2023 年 10 月 27 日
for z=(s_asterisk_tax:1:(T-1))
W_t(z+1)=0;
for s=(s_asterisk_tax:1:z)
W_t(z+1)=W_t(z+1)+(((L_0*g^s-Z_t_tax)*(1-tau)-C_0*((epsilon_1)^(s_asterisk_tax))*(epsilon_2^(s-s_asterisk_tax)))*((1+r(1-tau))^(z-s)))
end
end
Can you please indicate my mistake?
Array indices must be positive integers or logical values.
Error in wealthaferwealth (line 96)
W_t(z+1)=W_t(z+1)+(((L_0*g^s-Z_t_tax)*(1-tau)-C_0*((epsilon_1)^(s_asterisk_tax))*(epsilon_2^(s-s_asterisk_tax)))*((1+r(1-tau))^(z-s)))

採用された回答

Steven Lord
Steven Lord 2023 年 10 月 27 日
Did you mean r*(1-tau) instead of r(1-tau) in the command in the innermost for loop?
  1 件のコメント
Raushan
Raushan 2023 年 10 月 27 日
Yes, thank you for noting.

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

その他の回答 (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