setparam - Change writable target object parameters

Syntax

MATLAB® command line

setparam(target_object, 'parameter_value')

Arguments

target_object

Name of an existing target object. The default name is tg.

parameter_value

Value for a target object parameter.

Description

Method of a target object. Set the value of the target parameter. This method returns a structure that stores the parameter index, previous parameter values, and new parameter values in the following fields:

Examples

Set the value of parameter index 5 to 100.

setparam(tg, 5, 100) 
ans = 
parIndexVec: 5
OldValues: 400
NewValues: 100

Simultaneously set values for multiple parameters. Use the cell array format to specify new parameter values.

setparam(tg, [1 5],{10,100}) 
ans = 
parIndexVec: [1 5]
OldValues: {[2]  [4]}
NewValues: {[10]  [100]}
  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS