MATLAB: Vectorize sum of discount rates discount ratevectorization Hi, I want to vectorize the calculation of series like this: [R^0;R^0+R^1;R^0+R^1+R^2;…etc. Im quite sure this should be easy, but i cant figure it out. Any help is greatly appreciated! 🙂 Best Answer R = 5;cumsum(R.^(0:4)) Related SolutionsMATLAB: Calculate 10y returns out of monthly data out = prod(1 + reshape(x,120,[])) - 1;orout = accumarray(ceil((1:numel(x))'/120),x(:),[],@(x)prod(1+x)-1); MATLAB: Solve Symsum equation for implied discount rate symsum() cannot be used for indexing. Create a vector of symbolic values and sum() that. eqn = sum(Stream .* (1+x).^-(1:length(Stream))) == 5274 Related QuestionSolve for discount rate for a matrix of cash flows and a vector of PVCan I create a vector with a specific pattern in MatlabSymbol rate
Best Answer