concat - Concatenate Simulink.SimulationData.Dataset object to another
Dataset object - MATLAB ([original](https://in.mathworks.com/help/simulink/slref/simulink.simulationdata.dataset.concat.html)) ([raw](?raw))
Main Content
Concatenate Simulink.SimulationData.Dataset
object to anotherDataset
object
Syntax
Description
dataset1 = concat([dataset1](#buq9jm%5F-1-dataset1),[dataset2](#buq9jm%5F-1-dataset2))
concatenates the elements of the Simulink.SimulationData.Dataset
object dataset2
to the Dataset
objectdataset1
.
Examples
The vdp
model logs data for the x1
and x2
signals. You can log additional signals using signal logging. Mark the signal coming from the Mu
block for logging. Then, simulate the model.
Simulink.sdi.markSignalForStreaming('vdp/Mu',1,'on') out = sim("vdp");
By default, all logged data is returned in a single variable in the workspace as a Simulink.SimulationOutput
object. Logged output data is grouped in a Dataset
object with the default name yout
. You can access the logged output data using dot notation.
ds1 = Simulink.SimulationData.Dataset 'yout' with 2 elements
Name BlockPath
____ _________
1 [1x1 Signal] x1 vdp/Out1
2 [1x1 Signal] x2 vdp/Out2
- Use braces { } to access, modify, or add elements using index.
Signal logging data is grouped in a Dataset
object with the default name logsout
.
ds2 = Simulink.SimulationData.Dataset 'logsout' with 3 elements
Name BlockPath
____ _________
1 [1x1 Signal] '' vdp/Mu
2 [1x1 Signal] x1 vdp/x1
3 [1x1 Signal] x2 vdp/x2
- Use braces { } to access, modify, or add elements using index.
You can use the concat
function to combine the signal logging Dataset
object and the logged output Dataset
object into one concatenated Dataset
object.
combinedDataset = concat(ds1,ds2)
combinedDataset = Simulink.SimulationData.Dataset 'yout' with 5 elements
Name BlockPath
____ _________
1 [1x1 Signal] x1 vdp/Out1
2 [1x1 Signal] x2 vdp/Out2
3 [1x1 Signal] '' vdp/Mu
4 [1x1 Signal] x1 vdp/x1
5 [1x1 Signal] x2 vdp/x2
- Use braces { } to access, modify, or add elements using index.
Input Arguments
Dataset
object to concatenate to, specified aSimulink.SimulationData.Dataset
object.
Dataset
object to concatenate, specified asSimulink.SimulationData.Dataset
object.
Version History
Introduced in R2015a
See Also
Objects
- Simulink.SimulationData.BlockPath | Simulink.SimulationData.Signal | Simulink.SimulationData.DataStoreMemory | Simulink.SimulationData.Dataset
Functions
- addElement | find | get | getElementNames | numElements | setElement