Assume you have an 4x4 matrix A of zeros: 

```
0   0   0   0
0   0   0   0
0   0   0   0
0   0   0   0

```

And an 4x1 vector B that represents column indices for matrix A (so values [1:4])

```
4
2
3
1

```

Now I want to increment those columnpositions in matrix A on the index on every row from vector B.
I have tried a couple of constructions myself but can't quite manage to do this. 

For example I tried:

```
A(:, B) = A(:, B)+1

```

Which just increment every element in A.

This is how I want the operation to act:

```
>> A(somethting(B)) = A(somethting(B)) + 1
0   0   0   1
0   1   0   0
0   0   1   0
1   0   0   0

```