Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: reshaping array
Date: Sun, 5 Feb 2012 01:22:15 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 4
Message-ID: <jgklk7$9fd$1@newscl01ah.mathworks.com>
References: <jgh80h$m6h$1@newscl01ah.mathworks.com> <jghdql$cnk$1@newscl01ah.mathworks.com> <jghicb$pt3$2@speranza.aioe.org>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-06-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1328404935 9709 172.30.248.38 (5 Feb 2012 01:22:15 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 5 Feb 2012 01:22:15 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2264149
Xref: news.mathworks.com comp.soft-sys.matlab:756752

I suppose if you're really determined to use reshape (and to be completely inefficient and unclear to boot)

a = ['A1' 'A2' 'A3' 'A4' 'A5' 'A6' 'A7' 'A8' ];
b = regexprep( reshape( fliplr( reshape(strrep(a, 'A', ''), [], 4) .' ) .', 1, [] ), '(\d)', 'A$1' )