| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
set(H,'PropertyName',value,...)
set(H,pn,pv)
set(H,S)
pv = set(h,'PropertyName')
S = set(h)
set(H,'PropertyName',value,...) sets the named property to the specified value for the objects in the handle array H.
set(H,pn,pv) sets the named properties specified in the cell array of strings pn to the corresponding values in the cell array pv for all objects specified in H. The cell array pn must be 1-by-n, but the cell array pv can be m-by-n where m is equal to length(H). set updates each object with a different set of values for the list of property names contained in pn.
set(H,S) sets the properties identified by each field name of struct S with the values contained in S. S is a struct whose field names are object property names.
pv = set(h,'PropertyName') returns the possible values for the named property.
S = set(h) returns the user-settable properties and possible values for the handle object h. S is a struct whose field names are the object's property names and whose values are cell arrays containing the possible values of the corresponding properties. The cell array is empty for properties that do not have finite possible values.
You can use property/value string pairs, structs, and property/value cell array pairs in the same call to set.
Override the hgsetget class setdisp method to change how MATLAB displays this information.
See Implementing a Set/Get Interface for Properties
handle, hgsetget, set, get (hgsetget)
![]() | set (COM) | set (RandStream) | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |