I'm trying to directly retrieve the second variable of a function that returns multiple variables. For example, I have the column vector a
as follows:
a = [5 ; 4 ; 3 ; 2 ; 1 ; 9 ; 8 ; 7];
And I want to retrieve the index of the minimum value. I know I can do this.
[n,i] = min(a);
i
But how can I do this essentially in one line? I thought this ould work but it does not:
min(a)(1)