N=1:N_max;
% We initialize matrix M below with zeros. It is a bit of overkill for this problem
% but it is generally good practice to avoid random values in to be used variable
M=0*(N); % since N is vector M will be a vector of zeros
% Creating matrix in advance is also good idea from speed prospective
% since computer does not spend time allocating memory 
% for constantly growing in size matrix in the for loop.
% Note that i goes as 1,2,3... 
% thus size of matrix M requires to hold 1,2,3... elements.
for i=N
	M(i)=(1+x/i)^i;
end
plot(N,M,'-');
xlabel('N, number of payments per year');
ylabel('Money grows');
title('Money grows vs number of payments per year');

