Consider the matrix `A` in Matlab of dimension `fxmxm`, e.g. with `f=4` and `m=3`

```
A(:,:,1)=[1 2 3; 4 5 6; 7 8 9; 10 11 12]

A(:,:,2)=[0.5 2 -1; 3 -1 0; 7 -5 8; 10 11 12]

A(:,:,3)=[-2 2 -2; 2 -2 -1; 7 -5 -3; 10 -2 0]

```

The characteristic of `A` is the following: consider the vector `1xm` `[A(i,j,1) A(i,j,2) ... A(i,j,m)]`. We have that `A(i,j,1)>=A(i,j,2)>=...>=A(i,j,m)`. This holds for any `i,j` with `i=1,...,f` and `j=1,...,m`. 

Without using loops, I want to construct the matrix `B` of dimension `fxm` such that `B(i,j)` gives the index of the first negative element in `[A(i,j,1) A(i,j,2) ... A(i,j,m)]`. If there are no negative elements in `[A(i,j,1) A(i,j,2) ... A(i,j,m)]`, `B(i,j)` should be equal to `m+1`. 

In the example above

```
B=[3 4 2; 4 2 3; 4 2 3; 4 3 4]

```