# spacetime

버전 1.0.0 (2.12 KB) 작성자:
spacetime creates an equally-spaced time vector between two points in time.
다운로드 수: 10
업데이트 날짜: 2022/2/9

라이선스 보기

SPACETIME(t_start,t_end,t_step,t_unit) creates an equally-spaced time vector between two points in time.
t0: Start time
tn: End time
ti: interval or number of time steps
t_unit: unit of time
Supported time step units:
Seconds - 'SEC' (integer or decimal)
Minutes - 'MIN' (integer or decimal)
Hours - 'HRS' (integer or decimal)
Days - 'DAY' (integer or decimal)
Weeks - 'WKS' (integer or decimal)
Months - 'MON' (integer)
Years - 'YRS' (integer)
n steps - 'STP' (integer indicating number of time steps)
Examples:
1) Bi-annual spacing:
t_out = SPACETIME(datetime('1950-09-01'),datetime('2022-09-01'),6,'MON')
t_out =
[01-Sep-1950
01-Mar-1951
01-Sep-1951
...
01-Sep-2021
01-Mar-2022
01-Sep-2022]
2) Minutely spacing:
t_out = SPACETIME([2022 2 9 12 0 0],[2022 2 9 18 0 0],5,'MIN')
t_out =
2022 2 9 12 0 0
2022 2 9 12 5 0
2022 2 9 12 10 0
... ... ... ... ... ...
2022 2 9 17 50 0
2022 2 9 17 55 0
2022 2 10 18 0 0
3) Specifying a number of time steps
t_out = SPACETIME(datestr(today),datestr(today+365),10,'STP')
t_out =
{'09-Feb-2022 00:00:00'}
{'21-Mar-2022 13:20:00'}
{'01-May-2022 02:40:00'}
{'10-Jun-2022 16:00:00'}
{'21-Jul-2022 05:20:00'}
{'30-Aug-2022 18:40:00'}
{'10-Oct-2022 08:00:00'}
{'19-Nov-2022 21:20:00'}
{'30-Dec-2022 10:40:00'}
{'09-Feb-2023 00:00:00'}
------------------------------------------------------------
Author Info
Jake Weis, Institute for Marine and Antarctic Studies (IMAS)
February 2022

### 인용 양식

Jakob Weis (2024). spacetime (https://www.mathworks.com/matlabcentral/fileexchange/106410-spacetime), MATLAB Central File Exchange. 검색됨 .

개발 환경: R2021b
모든 릴리스와 호환
##### 플랫폼 호환성
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0