| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
h.set('pname', value)
h.set('pname1', value1, 'pname2', value2,
...)
set(h, ...)
h.set('pname', value) sets the property specified in the string pname to the given value.
h.set('pname1', value1, 'pname2', value2, ...) sets each property specified in the pname strings to the given value.
set(h, ...) is an alternate syntax for the same operation.
See Handling COM Data in MATLAB Software in the External Interfaces documentation for information on how MATLAB converts workspace matrices to COM data types.
COM functions are available on Microsoft Windows systems only.
Create an mwsamp control and use set to change the Label and Radius properties:
f = figure ('position', [100 200 200 200]);
h = actxcontrol ('mwsamp.mwsampctrl.1', [0 0 200 200], f);
h.set('Label', 'Click to fire event', 'Radius', 40);
h.invoke('Redraw');Here is another way to do the same thing, only without set and invoke:
h.Label = 'Click to fire event'; h.Radius = 40; h.Redraw;
get (COM), inspect, isprop, addproperty, deleteproperty
![]() | set | set (hgsetget) | ![]() |

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 |