| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → xPC Target |
| Contents | Index |
| Learn more about xPC Target |
MATLAB command line
setparam(target_object, parameter_index, parameter_value)
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. |
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:
parIndexVec
OldValues
NewValues
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]}
![]() | set (target application object) | setxpcenv | ![]() |

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 |