Path: news.mathworks.com!not-for-mail
From: "Ricardo Silva" <ricardogs@terra.com.br>
Newsgroups: comp.soft-sys.matlab
Subject: Help with a Loop
Date: Thu, 18 Dec 2008 01:09:03 +0000 (UTC)
Organization: University of S&#227;o Paulo
Lines: 13
Message-ID: <gic7rf$486$1@fred.mathworks.com>
Reply-To: "Ricardo Silva" <ricardogs@terra.com.br>
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 1229562543 4358 172.30.248.37 (18 Dec 2008 01:09:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 18 Dec 2008 01:09:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 209997
Xref: news.mathworks.com comp.soft-sys.matlab:507638

Hi,
I want to put the following statments in a loop, from 1 to 20:

n1 = sqrt(diag(sec1'*sec1)); secn1= sec1./(ones(size(sec1,1),1)*n1');
n2 = sqrt(diag(sec2'*sec2)); secn2= sec2./(ones(size(sec2,1),1)*n2');
..........
n20 = sqrt(diag(sec20'*sec20)); secn20= sec20./(ones(size(sec20,1),1)*n20');

Any help?

Thanks
Rick