Mercurial > hg > octave-lojdl
changeset 7610:60398362938c
Emil Lucretiu
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 19 Mar 2008 16:28:23 -0400 |
parents | 7e6002d15d4d |
children | 4f903c303c3c |
files | doc/interpreter/contributors.in scripts/ChangeLog scripts/signal/sinetone.m |
diffstat | 3 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/contributors.in +++ b/doc/interpreter/contributors.in @@ -113,6 +113,7 @@ David Livings Erik de Castro Lopo Massimo Lorenzin +Emil Lucretiu Hoxide Ma James Macnicol Jens-Uwe Mager
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,7 @@ +2008-03-19 Emil Lucretiu <emil@la.mine.nu> + + * signal/sinetone.m: Ensure integral number of samples. + 2008-03-19 Michael D. Godfrey <godfrey@isl.stanford.edu> * plot/__go_draw_axes__.m: Additional correction for symbol codes.
--- a/scripts/signal/sinetone.m +++ b/scripts/signal/sinetone.m @@ -54,11 +54,14 @@ endif n = length (f); + ns = round (r * s); - retval = zeros (r * s, n); + retval = zeros (ns, n); + for k = 1:n - retval (:, k) = a(k) * sin (2 * pi * (1:r*s) / r * f(k))'; + retval (:, k) = a(k) * sin (2 * pi * (1:ns) / r * f(k))'; endfor endfunction +%!assert (size (sinetone (18e6, 150e6, 19550/150e6, 1)), [19550, 1]);