Path: news.mathworks.com!not-for-mail
From: "Justin " <jstain@gmail.com>
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$1@newscl01ah.mathworks.com>
Reply-To: "Justin " <jstain@gmail.com>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1320038051 5671 172.30.248.35 (31 Oct 2011 05:14:11 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 31 Oct 2011 05:14:11 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3087585
Xref: news.mathworks.com 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,

-Justin