Matrix value multiplication error
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sherman Ng
am 12 Feb. 2022
Kommentiert: Sherman Ng
am 12 Feb. 2022
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?

0 Kommentare
Akzeptierte Antwort
David Hill
am 12 Feb. 2022
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 Kommentare
David Hill
am 12 Feb. 2022
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
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!