Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

set (COM)

Set object or interface property to specified value

Syntax

set(h,'pname',value)
set(h,'pname1',value1,'pname2',value2,...)

Description

set(h,'pname',value) sets property pname to value.

set(h,'pname1',value1,'pname2',value2,...) sets each property pname1,pname2,... to the corresponding value1,value2,....

For information on how MATLAB® converts workspace matrices to COM data types, see Handle COM Data in MATLAB.

COM functions are available on Microsoft® Windows® systems only.

Examples

Create an mwsamp control and use set to change the Label and Radius properties with a single statement.

f = figure('position',[100 200 200 200]);
h = actxcontrol('mwsamp.mwsampctrl.1',[0 0 200 200],f);

set(h,'Label','Click to fire event','Radius',40);
Redraw(h)

Alternatively:

h.Label = 'Click to fire event';
h.Radius = 40;
Redraw(h)

Introduced before R2006a

Was this topic helpful?