MATLAB: Sum in matrix matalab Hi if i have x matrix from 1 to i have many different value and i want creat a new matrix y where y(1)=x(1) y(2)=x(1)+x(2) y(3)=x(1)+x(2)+x(3) y(i)=x(1)+…+x(i) how i can make it thx Best Answer y = cumsum(x); Related SolutionsMATLAB: Problem using mesh. “Matrix is singular to working precision.” Actually, the problem is that you do matrix operation but instead, you need to do elementwise operation, which means using ./ and .* instead of / and *. Try this:[X,Y] = meshgrid([-3:0.01:3]); f1=@(X,Y) (3*X.^2.*Y + 10.*X.*Y.^2)./(exp(X.^2) + 3.*Y.^4) - (2.*X.*exp(X.^2).*(X.^3.*Y + 5.*X.^2*Y.^2))./(exp(X.^2) + 3*Y.^4).^2;mesh(X,Y,f1(X,Y)); MATLAB: Hi, I wont to solve this integration y=x^2, from 2.1 to 3.5, plz help me integrate(@(x) x.^2, 2.1, 3.5) Related QuestionSumCumulative sum in matrix
Best Answer