Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Problem with a for loop
Posted:
Oct 25, 2012 10:59 AM


Hi,
I'm a student and I need help on this case:
I have a matrix "V" with N = 100 rows and T = 30 columns which describes the value of a fund for 30 years. The expenditure that the fund have to do for the next year should be the arithmetic mean of the last three years fund's value. This is inside a for loop, so i have to do this for 30 years (T), N times. I tried the code below, but it does'nt work:
for t = 1: T E (1: N, t +1) = (mean (V (1: N, t: t2), 2)));
Can you help me?
Thanks



