Path: news.mathworks.com!not-for-mail
From: "Katie " <kmcdon03@uoguelph.ca>
Newsgroups: comp.soft-sys.matlab
Subject: variable help
Date: Fri, 9 May 2008 16:05:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <g01snh$q9j$1@fred.mathworks.com>
Reply-To: "Katie " <kmcdon03@uoguelph.ca>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1210349105 26931 172.30.248.37 (9 May 2008 16:05:05 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 9 May 2008 16:05:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1380460
Xref: news.mathworks.com comp.soft-sys.matlab:467614


This is my first time using MATLAB,
I am using this formula to compute sign patterns of 4x4 
nilpotent matrices;
A(n+1)=P*A(n)*inv(P) for n=1,2,3,4, where P is a random 
matrix and A(1) is the 4x4 jordan. (This formula can be 
repeated up to n=4 before sign patterns are duplicated, n 
is the number of times that the random matrix (P) can be 
used- just a subscript to define the variables). so what I 
did was:
A2=P*A1*inv(P)  
A3=P*A2*inv(P)
A4=P*A3*inv(P)
A5=P*A4*inv(P)

I want to loop this until all the possible sign patterns 
for nilpotent matrices are obtained, changing the random 
matrix every 4 times. BUT obviously if I were to loop this 
set of equations, for each new P the variables would just 
be replaced each time since they are named the same. I have 
tried using A(i) or A(n) like in the original equation, but 
it is read as multiplication. How do I solve this problem? 
or create some sort of subscript system so that the 
subscript of the variables change each time. 
THANK YOU!