Question: index problems in a for loop...please help!

October 25 2010 mrbohn1 5
Maple

1

Aaaargh!  I'm going crazy here.  If anyone can help I will be massively grateful!

My problem is quite simple:  I have a long list of data, in the form: f1:=[some matrix] f2:=[another matrix]...etc.

The data has been read in from a different program.  I am trying to write a program to go through each matrix one by one and perform some operations on it.  Usually to do this I take some dummy variable, say i or j, and write:

 

for j from 1 to n do

[whatever I want to do];

od;

 

In this case what i want to do is perform some  operation on the matrix fj.  But Maple is just taking fj to be the letters fj, rather than stepping through the matrices f1, f2, f3, etc.

I know if I could just relabel the matrices f[1],f[2],.. then this method would be possible.  BUt I don't know how to go through all this data and relabel them without just doing it manually.

Any ideas?

Please Wait...