For example

`x = [1 2 3 4 5 6; 7 8 9 10 11 12;13 14 15 16 17 18;1 2 3 4 5 6]`

I want sum of [1 2 3 7 8 9] which is = 72 and [4 5 6 10 11 12 15 16 17 18] which is 114 , then [1 2 3 1 1 1 2 4 3] which is 18 and so on

Skip to content# MATLAB: Sum of matrices and loop

###### Related Question

convolution

For example

`x = [1 2 3 4 5 6; 7 8 9 10 11 12;13 14 15 16 17 18;1 2 3 4 5 6]`

I want sum of [1 2 3 7 8 9] which is = 72 and [4 5 6 10 11 12 15 16 17 18] which is 114 , then [1 2 3 1 1 1 2 4 3] which is 18 and so on

- Remove all NaN values from an array.
- I have a matrix of 5 rows and 3 columns and i want to select only 1st 3rd and 4th row with all column using an array how to do it?whats the script
- How to do the following in a simpler and smarter way
- How to add a +1 to some of the numbers in a matrix
- Reshape 3d matrix to obtain a column vector
- Reshape an array into another
- How to sum two rows at a time in matrix
- How to measure an angle of peaks in a plot

## Best Answer