Path: news.mathworks.com!not-for-mail
From: "Sean " <sean.dewolski@nospamplease.umit.maine.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Difficult matrix construction
Date: Thu, 7 Oct 2010 16:35:04 +0000 (UTC)
Organization: University of Maine
Lines: 18
Message-ID: <i8ksro$b5v$1@fred.mathworks.com>
References: <i8krvm$dm3$1@fred.mathworks.com>
Reply-To: "Sean " <sean.dewolski@nospamplease.umit.maine.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1286469304 11455 172.30.248.38 (7 Oct 2010 16:35:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 7 Oct 2010 16:35:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2256903
Xref: news.mathworks.com comp.soft-sys.matlab:676615

"Dennis Belleter" <d.j.w.belleter@student.tue.nl> wrote in message <i8krvm$dm3$1@fred.mathworks.com>...
> I'm having some trouble designing a MatLab algorithm for the construction of a rather complicated matrix. The marix structure is as follows:
> 
> |  B                  0                     0          ....       0 |
> | A*B               B                     0          ....       0 |
> | A^2*B          A*B                  B          ....       0 |
> |   :                  :                     :            :         : |
> | A^(N-1)*B   A^(N-2)*B    A^(N-3)*B   ....      B |
> 
> where A and B are matrices as well.
> 
> I want to construct and use this matrix in an m-file for any arbitrary N.
> I hope that someone has an algorithm for the construction of this matrix and can help me.

Like this?

n = 4; %Must equal size of both dimensions of A and B
fancy_mat = B.*tril(A.^toeplitz(0:n-1));