MATLAB: Need help in to write a matlab script matlab script how do you write a matlab script to calculate the Sum for the expression? http://s188.beta.photobucket.com/user/raneses88/media/untitled-1_zpscb940cb6.jpg.html?sort=3&o=0 Best Answer n = 10; % assuming it to be 10x = 0;for i = 1 : n x = ((1/i) + (1/(i+2)*(i+3))) + x;end Related SolutionsMATLAB: How to create a vector with a sequence 1, u, u(u-1), u(u-1)(u-2)…. syms un = 7;A = [1,cumprod(u - (0:n))];A =[ 1, u, u*(u - 1), u*(u - 1)*(u - 2), u*(u - 1)*(u - 2)*(u - 3), u*(u - 1)*(u - 2)*(u - 3)*(u - 4), u*(u - 1)*(u - 2)*(u - 3)*(u - 4)*(u - 5), u*(u - 1)*(u - 2)*(u - 3)*(u - 4)*(u - 5)*(u - 6), u*(u - 1)*(u - 2)*(u - 3)*(u - 4)*(u - 5)*(u - 6)*(u - 7)] MATLAB: How to construct this vector without loop Here is flexible version not using cell2mat:n = 4 ; % user specifiedV = 3 ; % as in the example -> [1:V 1:2*V ... 1:n*V]ix = V*[1:n]A = ones(1,sum(ix))ix =ix(1:n-1)A(cumsum(ix)+1)=-ix+1A = cumsum(A) % result Related QuestionHow to write this in MATLABPlease explain the working of 2nd ,3rd and 4th statements of this coding portion:
Best Answer