Let X be a m×n matrix and f(i) is a column index for the ith row.
I want to get a m×1 vector y where y(i)=X(i,f(i)) for 1<=i<=m.
Is there any method to get y other than  the following code?
for i=1:m
        y(i)=X(i,f(i));
end

Best regards




--
View this message in context: 
http://mailinglists.scilab.org/extracting-elements-of-a-matrix-tp4033321.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at 
Nabble.com.
_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to