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:
482 bytes
|
Line | |
---|
1 | function s = setfield(s,field,v)
|
---|
2 | %SETFIELD Set mutable structure field contents.
|
---|
3 | % setfield(s,'field',v) sets the contents of the specified field to the
|
---|
4 | % value V. This is equivalent to the syntax S.field = V.
|
---|
5 | %
|
---|
6 | % See also GETFIELD, RMFIELD, ISFIELD, FIELDNAMES.
|
---|
7 |
|
---|
8 | % Written by Tom Minka
|
---|
9 | % (c) Microsoft Corporation. All rights reserved.
|
---|
10 |
|
---|
11 | jv = s.obj;
|
---|
12 | if ~jv.containsKey(field)
|
---|
13 | % add a new field
|
---|
14 | jv.get('_fields').addElement(field);
|
---|
15 | end
|
---|
16 | jv.put(field,asJava(v));
|
---|
Note: See
TracBrowser
for help on using the repository browser.