Given a matrix X, 1st add a column to the matrix whose elements are the summation of each rows. Then add a row to the matrix whose elements are the summation of all elements above in the same column. For example
➢ Input: x= [2,5; 3,8]
➢ Output: y= [2,5,7; 3,8,11;5,13,18]
Solution Stats
Solution Comments
Show comments
Loading...
Problem Recent Solvers21
Suggested Problems
-
Find the largest value in the 3D matrix
1669 Solvers
-
Flip the main diagonal of a matrix
907 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
647 Solvers
-
Find out missing number from a vector of 9 elements
322 Solvers
-
Remove element(s) from cell array
1996 Solvers
More from this Author8
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!