Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fill a matrix
Date: Wed, 1 Aug 2007 07:36:38 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 10
Message-ID: <f8pd66$rt4$1@fred.mathworks.com>
References: <f8pav4$pv1$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
NNTP-Posting-Host: webapp-01-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185953798 28580 172.30.248.36 (1 Aug 2007 07:36:38 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 1 Aug 2007 07:36:38 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:422003


Flavio Eripi:
<SNIP stitching numbers...

one of the many(!) solutions

     m=ones(4);
     m(~eye(size(m)))=5;
     m

us