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

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

Added original make3d

  • Property svn:executable set to *
File size: 621 bytes
Line 
1function s = rmfield(s,field)
2%RMFIELD Remove fields from a mutable structure.
3% rmfield(s,'field') removes the specified field from the mutable structure s.
4% rmfield(s,fields) removes more than one field at a time when FIELDS is a
5% cell array of strings. 
6%
7% See also SETFIELD, GETFIELD, ISFIELD, FIELDNAMES.
8
9% Written by Tom Minka
10% (c) Microsoft Corporation. All rights reserved.
11
12fields = s.obj.get('_fields');
13if iscellstr(field)
14  for i = 1:length(field)
15    s.obj.remove(field{i});
16    fields.removeElement(field{i});
17  end
18else
19  s.obj.remove(field);
20  fields.removeElement(field);
21end
Note: See TracBrowser for help on using the repository browser.