timeseries2timetable
설명
TT = timeseries2timetable(
는 ts
)timeseries
배열 ts
를 타임테이블로 변환합니다.
ts
가timeseries
객체이면TT
는 하나의 변수를 갖는 타임테이블입니다.ts
가timeseries
객체로 구성된 배열이면TT
는ts
에 포함된 timeseries 객체의 개수와 동일한 개수의 변수를 갖는 타임테이블입니다.ts
의 모든timeseries
객체는 동일한 샘플 시간을 가져야 합니다.
TT = timeseries2timetable(ts1,...,tsN)
은 timeseries
객체 ts1,...,tsN
을 타임테이블로 변환합니다. TT
의 변수 개수는 입력값의 개수와 같습니다. 모든 timeseries
객체 ts1,...,tsN
은 동일한 샘플 시간을 가져야 합니다.
예제
timeseries
객체를 타임테이블로 변환하기
10초 간격으로 샘플링된 5개의 난수를 갖는 timeseries
객체를 만듭니다.
ts = timeseries(rand(5,1),[0 10 20 30 40])
timeseries Common Properties: Name: 'unnamed' Time: [5x1 double] TimeInfo: tsdata.timemetadata Data: [5x1 double] DataInfo: tsdata.datametadata
ts
의 시간 및 데이터를 표시합니다.
ts.Time
ans = 5×1
0
10
20
30
40
ts.Data
ans = 5×1
0.8147
0.9058
0.1270
0.9134
0.6324
ts
를 타임테이블로 변환합니다.
TT = timeseries2timetable(ts)
TT=5×1 timetable
Time Data
______ _______
0 sec 0.81472
10 sec 0.90579
20 sec 0.12699
30 sec 0.91338
40 sec 0.63236
timeseries
객체로 구성된 배열을 타임테이블로 만들기
timeseries
객체로 구성된 배열을 만듭니다. 동일한 샘플 시간을 갖는 동일한 벡터를 사용하되, 각 시계열에 서로 다른 이름을 지정합니다. rand
함수를 사용하여 서로 다른 데이터 값을 갖는 배열을 만듭니다.
ts1 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_1"); ts2 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_2"); ts3 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_3"); ts = [ts1 ts2 ts3]
1x3 timeseries array with properties: Events Name UserData Data DataInfo Time TimeInfo Quality QualityInfo IsTimeFirst TreatNaNasMissing Length
모든 timeseries
객체의 데이터를 하나의 타임테이블로 결합합니다. 배열의 각 시계열은 타임테이블의 변수 하나를 생성합니다.
TT = timeseries2timetable(ts)
TT=5×3 timetable
Time Series_1 Series_2 Series_3
______ ________ ________ ________
0 sec 0.81472 0.09754 0.15761
10 sec 0.90579 0.2785 0.97059
20 sec 0.12699 0.54688 0.95717
30 sec 0.91338 0.95751 0.48538
40 sec 0.63236 0.96489 0.80028
복수의 시계열 입력하기
여러 개의 입력값을 하나의 타임테이블로 변환합니다.
ts1 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_1"); ts2 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_2"); ts3 = timeseries(rand(5,1),[0 10 20 30 40],"Name","Series_3"); TT = timeseries2timetable(ts1,ts2,ts3)
TT=5×3 timetable
Time Series_1 Series_2 Series_3
______ ________ ________ ________
0 sec 0.81472 0.09754 0.15761
10 sec 0.90579 0.2785 0.97059
20 sec 0.12699 0.54688 0.95717
30 sec 0.91338 0.95751 0.48538
40 sec 0.63236 0.96489 0.80028
입력 인수
ts
— 입력 시계열
timeseries
객체로 구성된 배열
입력 시계열로, timeseries
객체로 구성된 배열로 지정됩니다.
이 함수는 ts
의 몇몇 속성을 사용하여 타임테이블의 데이터를 할당하거나 속성을 설정합니다. 다음 표는 각 timeseries
속성에 대한 출력 타임테이블에서의 결과를 설명합니다.
입력 | 출력 타임테이블의 결과 |
---|---|
| 대응되는 타임테이블 변수의 이름을 지정합니다.
|
| 대응되는 타임테이블 변수에 할당되는 데이터를 지정합니다. |
| 대응되는 타임테이블 변수의 |
| 대응되는 타임테이블 변수의 |
| 샘플 시간을 타임테이블의 행 시간값으로 변환합니다. 행 시간값으로 구성된 벡터는 입력값의 |
| 행 시간값의 단위를 지정합니다. 타임테이블 행 시간값으로 구성된 벡터가 |
| 행 시간값의 형식을 설정합니다. |
| 타임테이블의 |
|
|
|
|
| 데이터의 방향을 변경해야 하는지 확인합니다. |
| 타임테이블의 |
| 경고합니다. |
| 경고합니다. |
|
|
버전 내역
R2021b에 개발됨R2021b: ts2timetable
이 timeseries2timetable
로 대체됨
ts2timetable
함수가 계속 제공되기는 하지만, ts2timetable
은 timeseries2timetable
함수로 대체되었습니다. 이 두 함수는 동일합니다. R2021a에서 MATLAB®은 ts2timetable
만 제공합니다.
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)