Main Content

find

Access and display values of simulation results

Syntax

output = find(simout, 'VarName')
output = simOut.find('VarName')

Description

output = find(simout, 'VarName') finds the VarName in Simulink.SimulationOutput. Specify VarName in single quotes.

output = simOut.find('VarName') is a syntax with dot notation for the find method.

Input Arguments

expand all

Simulation output to find VarName in.

Name of logged variable for which you seek values.

Output Arguments

Value

Value of the logged variable name specified in input.

Examples

Simulate vdp and store the values of the variable youtNew in yout.

simOut = sim('vdp','SaveState','on','StateSaveName','xoutNew',...
         'SaveOutput','on','OutputSaveName','youtNew');
yout = simOut.find('youtNew')