From: "Justin " <>
Newsgroups: comp.soft-sys.matlab
Subject: Calling points in an array with vectors
Date: Mon, 31 Oct 2011 05:14:11 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 3
Message-ID: <j8lar3$5h7$>
Reply-To: "Justin " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1320038051 5671 (31 Oct 2011 05:14:11 GMT)
NNTP-Posting-Date: Mon, 31 Oct 2011 05:14:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3087585
Xref: comp.soft-sys.matlab:747653

Ok here's what I want to do. Basically, I have an array A and two vectors x and y where x = [1 3 2] and y = [5 6 9]. I want to do something like A(x,y) where the points (1,5), (3,6), and (2,9) are called. But, when I entered the vectors as such, it calls all permutations of (1,5), (3,6),and (2,9), although the points for the aforementioned coordinates are located along the diagonal. Anyone have any ideas how I'd go about doing this preferably without a for loop. Thanks a bunch,