join
Class: matlab.automation.diagnostics.Diagnostic
Package: matlab.automation.diagnostics
Join multiple diagnostics into a single array
Syntax
diagArray = join(diag1,...,diagN)
Description
joins multiple diagnostics, specified by diagArray
= join(diag
1,...,diag
N)diag1
through
diagN
, into a single array, diagArray
.
Input Arguments
|
Diagnostic content, specified as a |
Output Arguments
|
Array of joined diagnostic content:
|
Examples
Alternatives
You can use array concatenation to join diagnostics into an array if at least one of
the values is a Diagnostic
object. The join
method
prevents the need to have any Diagnostic
objects in the array.
Considering the following example.
arbitraryValue = 5; testCase.verifyThat(false, IsTrue, ... ['should have been true', ... @() system('ps'), ... arbitraryValue, ... MyCustomDiagnostic]);
Since MyCustomDiagnostic
is a Diagnostic
object,
the other values are correctly converted to diagnostics as well.