Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: how to creat matrix from loop result
Date: Sun, 5 Apr 2009 04:12:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 14
Message-ID: <gr9b2h$hcs$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1238904721 17820 172.30.248.38 (5 Apr 2009 04:12:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 5 Apr 2009 04:12:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1787963
Xref: news.mathworks.com comp.soft-sys.matlab:530395

Hi,

I am trying to create a 1xn matrix from a loop

simply
for i=1:80;
A=[1 2 3 4];
B=[1 2 3 3;4 3 2 3;5 4 4 3;  9 8 9 0];
C=A*B^i
D=C(1)+C(2)*2+C(3)*3+C(4)*4
then we can get D values for different i, and Matrix E is what I need
E=[D(1), D(2) ....]

How to make this happen? thanks