|
"Ulrik Nash" <uwn@sam.sdu.dk> wrote in message <i1evbp$lmv$1@fred.mathworks.com>...
> Hi Everyone,
>
> I thought I had this one nailed, but I can't seem to get what i want:
>
> Suppose I have a matrix A:
>
> A = [1 5; 2 3; 4 4]
>
> and B
>
> B = [1 3]
>
> Now, I want to select the values in A given by the index in B, but in column 2, not column 1
>
> If I use the command:
>
> C = A(B)
>
> I get the correct rows, but not the correct column.
>
> What am I missing?
>
> Kind regards,
>
> Ulrik.
>
Sorry, to waste time. I got it:
C = A(B,2)
Correct me if I am wrong...
|