MATLAB Answers

Code with function file not working

22 views (last 30 days)
JaffaCakes
JaffaCakes on 14 Apr 2021 at 14:35
Commented: JaffaCakes on 14 Apr 2021 at 14:55
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

Accepted Answer

VBBV
VBBV on 14 Apr 2021 at 14:40
%if true
P = X*(1+r/100).^t
Change this line by adding operators
  1 Comment
JaffaCakes
JaffaCakes on 14 Apr 2021 at 14:55
Thanks I hadn't noticed this

Sign in to comment.

More Answers (1)

David Hill
David Hill on 14 Apr 2021 at 14:41
No reason for global variables. Problem is equation
P=X*(1+r/100)^t;%need X*

Community Treasure Hunt

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

Start Hunting!

Translated by