Matrix value multiplication error
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, so I'm trying to get the n values to multiply each values in the P matrix in order to get the compound interest values, but I'm getting this error, how can I fix this?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/892030/image.png)
댓글 수: 0
채택된 답변
David Hill
2022년 2월 12일
Use the code box!
n=[1,3,16];
P=[300 400 500 700 1000]';%transpose
t=4;
y=P.*(1+t/100).^n-P;
댓글 수: 3
David Hill
2022년 2월 12일
Not true.
y =
12.0000 37.4592 261.8944
16.0000 49.9456 349.1925
20.0000 62.4320 436.4906
28.0000 87.4048 611.0869
40.0000 124.8640 872.9812
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!