fn_set

Contents

Syntax

fn_set(hobjs,fields,values)
fn_set(hobjs,field1,value1,field2,value2,...)
fn_set(hobjs,s)
fn_set({hobj1,arg1},{hobj2,arg2},...)

Description

Input:
- hobjs   vector of nobj graphic handles or object handles
- fields  cell array of nfield strings, or a single string
- values  nobj x nfield cell array of values (or 1 x nfiel cell array, or
          a single value)
- field1, value1, ...     pairs of field name and values; values can be a
          vector cell array of length nobj
- s       structure of length nobj (or scalar structure) and with fields
          the names of properties to be set
fn_set performs set(hobjs(i),fields{j},values{i,j}) for every possible i
and j
in case of a structure s, performs set(h(i),f{j},x(i).(f{j}))
fn_set also has some heuristics to set properties that do not exist:
- setting properties 'xdata', 'ydata' and 'zdata' for object of type
  'text' actually result in setting its property 'position'
See also fn_get

Source

Thomas Deneux

Copyright 2007-2017