From help-request at octave dot org Mon Apr 10 12:15:22 2006 Subject: Re: square waves From: "Keith Goodman" To: NZG Cc: "Paul Kienzle" , "Doug Stewart" , help@octave.org Date: Mon, 10 Apr 2006 10:13:18 -0700 On 4/10/06, NZG wrote: > On Saturday 08 April 2006 5:48 am, Paul Kienzle wrote: > > Octave-forge has the compatibility functions pulstran and rectpuls > > which can do the same thing: > > > > n = 8*350; > > x = pulstran([1:n],[101:350:n],'rectpuls',250); > Looks nice, thanks. > > >See also the function square just added to octave-forge. > Same thing Matlab has, nice for compatibility but I don't like it because you > don't get what you expect when you plot it, interpolation gives you a > trianglish wave instead of a square. Have you tried plotting it with stairs.m? ------------------------------------------------------------- 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 -------------------------------------------------------------