Now I am using the following code. In the following code I am using the index for getting the signal. Is there any method to get the index number or get signal by name? I have around 40 signals and the signal that I am checking at index 30. If I log more signals the index is changing. Is there any method to get the index number or get signal by name?
% Get the output Simulink.sdi.Run object
outobj = test.TestResult.getOutputRuns;%Get object of type Simulink.sdi.Signal
sig = outobj.getSignalByIndex(1);% return a struct containing data
data = sig.dataValues; % Contains both data and the time
assert(data.Data(end) == Test_Sequence1_Active_Step_Enum.Finish, 'Test Failed after %d seconds, last step in Test Sequence is : %s ',data.Time(end), data.Data(end));
Best Answer