Main Content

concat

Simulink.SimulationData.Dataset 객체를 다른 Dataset 객체에 결합

설명

예제

dataset1 = concat(dataset1,dataset2)Simulink.SimulationData.Dataset 객체 dataset2의 요소를 Dataset 객체 dataset1에 결합합니다.

예제

모두 축소

vdp 모델은 x1 신호 및 x2 신호에 대한 데이터를 기록합니다. 신호 기록을 사용하여 추가 신호를 기록할 수 있습니다. 기록할 대상으로 Mu 블록에서 오는 신호를 표시합니다. 그런 다음 모델을 시뮬레이션합니다.

Simulink.sdi.markSignalForStreaming('vdp/Mu',1,'on')
out = sim("vdp");

기록된 모든 데이터는 기본적으로 작업 공간의 단일 변수에 Simulink.SimulationOutput 객체로 반환됩니다. 기록된 출력 데이터는 디폴트 이름 yout으로 Dataset 객체에 그룹화됩니다. 점 표기법을 사용하여 기록된 출력 데이터에 액세스할 수 있습니다.

ds1 = out.yout
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.

신호 기록 데이터는 디폴트 이름 logsout으로 Dataset 객체에 그룹화됩니다.

ds2 = out.logsout
ds2 = 
Simulink.SimulationData.Dataset 'logsout' with 1 element

                         Name  BlockPath 
                         ____  _________ 
    1  [1x1 Signal]      ''    vdp/Mu   

  - Use braces { } to access, modify, or add elements using index.

concat 함수를 사용하여 신호 기록 Dataset 객체와 기록된 출력 Dataset 객체를 하나의 결합된 Dataset 객체로 합칠 수 있습니다.

combinedDataset = concat(ds1,ds2)
combinedDataset = 
Simulink.SimulationData.Dataset 'yout' with 3 elements

                         Name  BlockPath 
                         ____  _________ 
    1  [1x1 Signal]      x1    vdp/Out1 
    2  [1x1 Signal]      x2    vdp/Out2 
    3  [1x1 Signal]      ''    vdp/Mu   

  - Use braces { } to access, modify, or add elements using index.

입력 인수

모두 축소

결합 대상이 되는 Dataset 객체로, Simulink.SimulationData.Dataset 객체로 지정됩니다.

결합할 Dataset 객체로, Simulink.SimulationData.Dataset 객체로 지정됩니다.

버전 내역

R2015a에 개발됨