From help-request at octave dot org Sun Apr 9 23:26:26 2006 Subject: Re: square waves From: NZG To: Przemek Klosowski , help@octave.org Date: Sun, 9 Apr 2006 23:21:54 -0500 > Is there a function for generating square waves in octave? > > squarewave(1:2:100)=1 will give you a vector that alternates between zeros > and ones. Is that what you had in mind? if not, could you be more specific > as to what wave you want to generate? I would like to be able to specify a duty cycle and frequency to impose on an array. Also I would like it to truly appear to be square from an interpolation perspective i.e. plotting and intersection interpolation do not assume the wave to be a smooth transition from 1 to zero, but a sharp nonlinearity (or at least approximately one) NZG ------------------------------------------------------------- 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 -------------------------------------------------------------