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*

카테고리

Help CenterFile Exchange에서 Software Development Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by