source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/lightspeed/argfilter.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 522 bytes
Line 
1function args = argfilter(args,keep)
2%ARGFILTER  Remove unwanted arguments.
3% ARGFILTER(ARGS,KEEP), where ARGS = {'arg1',value1,'arg2',value2,...},
4% returns a new argument list where only the arguments named in KEEP are
5% retained.  KEEP is a character array or cell array of strings.
6
7% Written by Tom Minka
8
9if ischar(keep)
10  keep = cellstr(keep);
11end
12i = 1;
13while i < length(args)
14  if ~ismember(args{i},keep)
15    args = args(setdiff_sorted(1:length(args),[i i+1]));
16  else
17    i = i + 2;
18  end
19end
Note: See TracBrowser for help on using the repository browser.