From help-request at octave dot org Thu Feb 3 21:50:03 2005 Subject: Re: unit sample sequence From: Geordie McBain To: NZG Cc: help at octave dot org Date: Fri, 4 Feb 2005 13:39:49 -0500 On Thu, Feb 03, 2005 at 09:21:32PM -0600, NZG wrote: > Is there an easy way to generate vector/matrix representing the unit sample > sequence in Octave? > > thx, > NZG. If "unit sample sequence" means the same as at http://www.swarthmore.edu/NatSci/echeeve1/Class/e71/E71L1/E71L1.html then it's just u=zeros(1,n); u(d)=1. For example: octave> u=zeros (1, 4); u(2)=1 u = 0 1 0 0 Geordie McBain www.aeromech.usyd.edu.au/~mcbain ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------