


makenat : returns the list with only natural numbers back
ie positive and non-zero integers)
INPUT :
list : input array of numbers
OUTPUT :
list : input with only the natural numbers
Copyright (C) 2016 Wiggins Lab
Written by Paul Wiggins.
University of Washington, 2016
This file is part of SuperSegger.
SuperSegger 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.
SuperSegger 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 SuperSegger. If not, see <http://www.gnu.org/licenses/>.

0001 function list = makenat( list ) 0002 % makenat : returns the list with only natural numbers back 0003 % ie positive and non-zero integers) 0004 % 0005 % INPUT : 0006 % list : input array of numbers 0007 % OUTPUT : 0008 % list : input with only the natural numbers 0009 % 0010 % Copyright (C) 2016 Wiggins Lab 0011 % Written by Paul Wiggins. 0012 % University of Washington, 2016 0013 % This file is part of SuperSegger. 0014 % 0015 % SuperSegger is free software: you can redistribute it and/or modify 0016 % it under the terms of the GNU General Public License as published by 0017 % the Free Software Foundation, either version 3 of the License, or 0018 % (at your option) any later version. 0019 % 0020 % SuperSegger is distributed in the hope that it will be useful, 0021 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0022 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0023 % GNU General Public License for more details. 0024 % 0025 % You should have received a copy of the GNU General Public License 0026 % along with SuperSegger. If not, see <http://www.gnu.org/licenses/>. 0027 0028 list = list(isnat( list )); 0029 0030 end