Code with function file not working

2 次查看(过去 30 天)
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 个)

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

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by