matlab com.set函数语法

发表matlab com.set函数相关文章
一句话说明: Set object or interface property to specified value

set (COM)

Set object or interface property to specified value

Syntax

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

Description

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.

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

Examples

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;

More About

Tips

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

See Also

| | | |

欢迎转载,转载请注明来自一手册:http://yishouce.com/matlab/func/com.set

与matlab com.set用法相关的文章

友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1