Last change
on this file since 177 was
37,
checked in by (none), 15 years ago
|
Added original make3d
|
-
Property svn:executable set to
*
|
File size:
621 bytes
|
Line | |
---|
1 | function 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 |
|
---|
12 | fields = s.obj.get('_fields');
|
---|
13 | if iscellstr(field)
|
---|
14 | for i = 1:length(field)
|
---|
15 | s.obj.remove(field{i});
|
---|
16 | fields.removeElement(field{i});
|
---|
17 | end
|
---|
18 | else
|
---|
19 | s.obj.remove(field);
|
---|
20 | fields.removeElement(field);
|
---|
21 | end
|
---|
Note: See
TracBrowser
for help on using the repository browser.