Question: I have a 5x5 matrix 

```
A = 
   [0    0    0    0    1; 
    0.36 0    0    0    1; 
    0    0.25 0    0    1; 
    0.35 0    0    0    1;
    0    0    0.28 0    1]; 

```

I want to extract lower triangular elements of the matrix without considering the diagonal elements. Therefore, resulting matrix should be

```
C = [0.36 0 0.35 0 0.25 0 0 0 0.28 0]

```

Let me know how I can get this.

Answer: 
You can use matlab `tril`, e.g.:

```
index = find(tril(ones(size(A)), -1));
C = A(index);

```
[`bsxfun`](http://www.mathworks.es/es/help/matlab/ref/bsxfun.html)-based approach:

```
C = A( bsxfun(@gt, (1:size(A,1)).', 1:size(A,2)) ).';

```