1 | function var=rempoints(var,npts) |
---|
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
3 | % |
---|
4 | % function var=rempoints(var,npts) |
---|
5 | % |
---|
6 | % crop the data to remove boundary values |
---|
7 | % |
---|
8 | % input: |
---|
9 | % |
---|
10 | % var data to proceed (2D matrix) |
---|
11 | % npts points to remove (for values vector) |
---|
12 | % ex: [3 3 3 0] : [west east south north] |
---|
13 | % output: |
---|
14 | % |
---|
15 | % var (2D matrix) |
---|
16 | % |
---|
17 | % Further Information: |
---|
18 | % http://www.brest.ird.fr/Roms_tools/ |
---|
19 | % |
---|
20 | % This file is part of ROMSTOOLS |
---|
21 | % |
---|
22 | % ROMSTOOLS is free software; you can redistribute it and/or modify |
---|
23 | % it under the terms of the GNU General Public License as published |
---|
24 | % by the Free Software Foundation; either version 2 of the License, |
---|
25 | % or (at your option) any later version. |
---|
26 | % |
---|
27 | % ROMSTOOLS is distributed in the hope that it will be useful, but |
---|
28 | % WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
29 | % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
30 | % GNU General Public License for more details. |
---|
31 | % |
---|
32 | % You should have received a copy of the GNU General Public License |
---|
33 | % along with this program; if not, write to the Free Software |
---|
34 | % Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
---|
35 | % MA 02111-1307 USA |
---|
36 | % |
---|
37 | % Copyright (c) 2001-2006 by Pierrick Penven |
---|
38 | % e-mail:Pierrick.Penven@ird.fr |
---|
39 | % |
---|
40 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
41 | [M,L]=size(var); |
---|
42 | var=var(npts(3)+1:M-npts(4),npts(1)+1:L-npts(2)); |
---|
43 | return |
---|