I want to calculate the ratio of elements of each column. For ex: my column has data A = [ 1;2;3;4;5;6;7;8;9;10] and I want to calculate the ratio of elements for which the numerator and denominator are the elements of the consecutive rows leaving the first row. B(1) = 2/1, B(2) = 3/2, B(3) = 4/3, and so on.. finally B = [2; 3/2; 4/3; 5/4;…]
MATLAB: How to calculate ratio of elements of a column
ratio of elements of the same column
Related Question
- How to replace the 3rd column element of a matrix by comparing 1st and 2nd column of another matrix
- Generation of random numbers
- Matrix data
- Example from patternnet docs fails in Neural Network Toolbox Version 10.0 (R2017a)
- Omit rows from matrix
- Confusion about the format in MATLAB
- Delete duplicated row in a matrix
- Graphing a system of equations on the same set of axes
Best Answer