[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Summing matrices that have been created in a loop
From: |
Hannah Irons |
Subject: |
Summing matrices that have been created in a loop |
Date: |
Thu, 31 Jan 2013 04:26:17 -0800 (PST) |
Hi;
I'm new to Octave and am struggling a bit. I've got the manual and have been
searching for help in the forums but I think I need specific help.
I have a 'for' loop that will construct matrices of a given size that I
state before the loop.
for
ii=1:n
% the matrix depends on the index ii, and some other parameters. but the
size of the matrices created are independent of 'ii' so are all the same
size. I won't give the actual formula that I'm using to construct the
matrices because for what I'm stuck in its not important.
Matrix=[0,ii;ii0]
% for this case, my loop creates 2x2 matrices and there would be 'n' of them
if it didn't overwrite the variable 'Matrix'.
What I would like to do is either output all the matrices for all the values
of 'ii', or have the loop deposit them in a sort or large matrix side by
side. My eventual output would be a summation of the matrices created by the
loop.
I hope that I've made my problem clear, and any help would be appreciated.
--
View this message in context:
http://octave.1599824.n4.nabble.com/Summing-matrices-that-have-been-created-in-a-loop-tp4649307.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Summing matrices that have been created in a loop,
Hannah Irons <=