Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!bloom-beacon.mit.edu!llnews!53ab2750!not-for-mail
From: Peter Boettcher <boettcher@ll.mit.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: bottleneck calculation
References: <ft05oa$46f$1@fred.mathworks.com>
Message-ID: <muyve30guqy.fsf@G99-Boettcher.llan.ll.mit.edu>
Organization: MIT Lincoln Laboratory
User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/23.0.0 (gnu/linux)
Cancel-Lock: sha1:WvDnReLBhJZSfQNW4ohfGZri1h4=
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Lines: 31
Date: Wed, 02 Apr 2008 11:08:05 -0400
NNTP-Posting-Host: 155.34.163.114
X-Complaints-To: news@ll.mit.edu
X-Trace: llnews 1207148291 155.34.163.114 (Wed, 02 Apr 2008 10:58:11 EDT)
NNTP-Posting-Date: Wed, 02 Apr 2008 10:58:11 EDT
Xref: news.mathworks.com comp.soft-sys.matlab:460575



"Dave Brackett" <davebrackett@hotmail.com> writes:

> Hi, thanks for your reply. Could you elaborate a bit more 
> on how I can do this? I am a relative novice with Matlab 
> and do not really understand what you mean. I have had a 
> look at the ndfun file but cannot find the mprod 
> subfunction you refer to. thanks a lot.

help ndfun:

  'mprod' behaves differently.  It cumulatively multiplies a set
    of matrices and produces a single 2D output.  The equivalent
    code is:
        C = A(:,:,1);
        for i=2:N
            C = C * A(:,:,i);
        end
    2D inputs return themselves.  Inputs with more than 3
    dimensions collapse the 3rd dimension only.  So with an A of
    size [2 2 7 3 4],
        C = ndfun('mprod', A);
    is equivalent to
        for i=1:3
            for j=1:4
                C(:,:,i,j)=ndfun('mprod',M(:,:,:,i,j));
            end
        end
    and C will have size [2 2 3 4].


-Peter