Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: How to retrieve the given column of the data of arbitrary size?
Date: Mon, 12 Nov 2012 12:25:16 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 2
Message-ID: <k7qprc$h2m$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1352723116 17494 172.30.248.37 (12 Nov 2012 12:25:16 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 12 Nov 2012 12:25:16 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1411057
Xref: news.mathworks.com comp.soft-sys.matlab:782593


For instance, A is a 10x10x10x10 matrix, the 3rd column of the 2nd dimension of A is given by squeeze(A(:,3,:,:)). What if the size of A is arbitrary? A could be 10x10, 5x10x5, 10x10x5x5x10, ..., or anything else. How to write a function applicable to arbitray A?