Code with function file not working

7 ビュー (過去 30 日間)
JaffaCakes
JaffaCakes 2021 年 4 月 14 日
コメント済み: JaffaCakes 2021 年 4 月 14 日
I'm writing a code to calculate investmenet after a certain amount of time, using the equation attached. (I've assumed Po is X in the code)
When I run the code, I get the error shown

採用された回答

VBBV
VBBV 2021 年 4 月 14 日
%if true
P = X*(1+r/100).^t
Change this line by adding operators
  1 件のコメント
JaffaCakes
JaffaCakes 2021 年 4 月 14 日
Thanks I hadn't noticed this

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

その他の回答 (1 件)

David Hill
David Hill 2021 年 4 月 14 日
No reason for global variables. Problem is equation
P=X*(1+r/100)^t;%need X*
  1 件のコメント
JaffaCakes
JaffaCakes 2021 年 4 月 14 日
Thanks :)

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

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by