関数random_sequence マニュアル

(The documentation of function random_sequence)

Last Update: 2024/12/13


◆機能・用途(Purpose)

正規分布に従う乱数の時系列データを生成する。
Create a time series data of random values that obey a normal distribution.


◆形式(Format)

#include <sequence/initialize.h>
inline struct sequence random_sequence
(const int size,const double t0,const double dt)


◆引数(Arguments)

size 作成する時系列データの時刻サンプル数\(N\)。
The number of time samples \(N\) of the time series data to create.
t0 作成する時系列データの先頭時刻\(t_0\)。
The beginning time \(t_0\) of the time series data to create.
dt 作成する時系列データのサンプリング間隔\(\Delta t\)。
The sampling interval \(\Delta t\) of the time series data to create.


◆戻り値(Return value)

時刻\(t=t_0+k\Delta t\) (\(k=0,1,2,\cdots,N-1\))で定義された時系列データ。 各時刻での値は 関数generate_gaussian_noise_value により生成した正規分布(平均値:0、標準偏差:1)に従う乱数とする。
An time series data defined at times \(t=t_0+k\Delta t\) (\(k=0,1,2,\cdots,N-1\)). The values at each time sample are the values of random variables that obey a normal distribution (average: 0, standard deviation: 1), generated by function generate_gaussian_noise_value.


◆使用例(Example)

srand(0);
struct sequence data=random_sequence(100,0.0,0.01);