// Copyright (C) 2010 Eric Chassande-Mottin, CNRS (France) // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, see . #include #include #include #include #include #include #include #include #include DEFUN_DLD (signbit, args,, "-*- texinfo -*-\n\ @deftypefn {Loadable Function} address@hidden =} upfirdn (@var{x},@var{h},@var{p},@var{q})\n\ Upsample, FIR filtering and address@hidden @end deftypefn\n") { octave_value_list retval; int nargin = args.length (); if (nargin < 1) { print_usage(); return retval; } Matrix x ( args(0).matrix_value () ); if (error_state) { gripe_wrong_type_arg("signbit",args(0)); return retval; } octave_idx_type rx=x.rows(); octave_idx_type cx=x.columns(); Matrix y(rx,cx,0.0); for (octave_idx_type r=0; r