Skip to Main Content Skip to Search
Product Documentation

getSignal - Signal mapped to signal name

Syntax

MAPPEDSIGNAL = getSignal(OBJ, SIGNALNAME)
OBJ.SIGNALNAME

Description

MAPPEDSIGNAL = getSignal(OBJ, SIGNALNAME) Gets the signal object currently mapped to the SIGNALNAME in this TestCase OBJ.

OBJ.SIGNALNAME is an alternative syntax.

If SIGNALNAME is not an existing name an error will be thrown.

Examples

Get a signal using getSignal().

 testCase = systest.TestCase('Test Case 1');
 testCase.In1 = systest.signals.Signal('Step');
 getSignal(testCase, 'In1')

Get a signal using getSignal() to get all signals.

testCase1 = systest.TestCase('Test Case 1');
testCase1.In1 = systest.signals.Signal('Step');

testCase2 = systest.TestCase('Test Case 2');
testCase2.In1 = systest.signals.Signal('Ramp');

testCases = [testCase1 testCase2];

getSignal(testCases, 'In1')

Get a signal by referencing its name space using '.' syntax.

 testCase = systest.TestCase('Test Case 1');
 testCase.In1 = systest.signals.Signal('Step');
 testCase.In1

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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