Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: vectorise a reshape loop
Date: Thu, 17 Jul 2008 11:08:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <g5n96i$4ei$1@fred.mathworks.com>
References: <g5krk2$77v$1@fred.mathworks.com> <g5kthu$svb$1@fred.mathworks.com> <g5n4kd$jtp$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216292882 4562 172.30.248.35 (17 Jul 2008 11:08:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 17 Jul 2008 11:08:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1338633
Xref: news.mathworks.com comp.soft-sys.matlab:479943



cut out quotes from previous posts as they are making the
post unreadable, also sorry for double post of previous
reply - don't know what happened there!

ok, i have spent some more time and the below for loop now
shows what I am trying to achieve. However, the cells are
causing me some trouble as i don't get 2x2 matrices for each
prodH entry. I have read that cells don't allow
vectorisation so is there a better way that someone can
suggest? Thanks.

M=cell(1,3,16);
prodH=cell(1,3);

for p=1:3
    q=p;
    for r=1:16;
        M(1,q,r)={reshape([ai_col(r,q) ci_col(r,q)
bi_col(r,q) di_col(r,q)].', 2, 2, [])}
    end
    prodH(1,q)={[ndfun('mprod', M(1,q,:))]} 
end