Products & Services Solutions Academia Support User Community Company

Learn more about xPC Target   

setparam - Change writable target object parameters

Syntax

MATLAB command line

setparam(target_object, parameter_index, parameter_value)

Arguments

target_object

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

parameter_index

Index number of the parameter.

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]}
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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