MATLAB: How to sum up a matrix n-times MATLABsum up matrix I have a matrix A = [1 2 3 4; 5 6 7 8] How to sum up a matrix up to n times.? Best Answer n*A ???You will need to provide a sample input & output so we can understand what you really want. Related SolutionsMATLAB: Is there a function to turn ?x2 matrix of coordinates of vertices of a polygon into a ?x4 matrix of coordinates of line segments of that polygon Yes,circshift will do the job:A = [2, 4; 5, 6; 6, 6; 8,5]B = [2, 4, 5, 6; 5, 6, 6, 6; 6, 6, 8, 5; 8, 5, 2, 4]% The solution:C = [A circshift(A,-1)]% The test:A = 2 4 5 6 6 6 8 5B = 2 4 5 6 5 6 6 6 6 6 8 5 8 5 2 4C = 2 4 5 6 5 6 6 6 6 6 8 5 8 5 2 4 MATLAB: Sum of matrix times scalars Hold your 3x3 matrices in a 3x3xN array caled T and your scalars in an Nx1 vector called a and do,result=reshape(T,9,[])*a(:);result=reshape(result,3,3); Related QuestionCounting n subsequent element of an arraySumThis question is about making a square matrix of order n x n in which the integers from 1 to ? 2 wind back and forth along the rows. If n=3 then [1,2,3;6,5,4;7;8;9]Create cell array with the same string n-timesHow to count the occurrences of a value for an matrixRun a Simulink model N-times and store the output of each runProbability of sum of dice rolling n times
Best Answer