Search Results for

    Show / Hide Table of Contents

    Class TimeSeriesCreator

    Class for static methods create different types of time-series for testing.

    Inheritance
    object
    TimeSeriesCreator
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TimeSeriesAnalysis.Utility
    Assembly: TimeSeriesAnalysis.dll
    Syntax
    public static class TimeSeriesCreator

    Methods

    | Edit this page View Source

    Concat(double[], double[])

    Combine to signals of length N1 and N2 into a new signal of length N1+N2

    Declaration
    public static double[] Concat(double[] u1, double[] u2)
    Parameters
    Type Name Description
    double[] u1
    double[] u2
    Returns
    Type Description
    double[]
    | Edit this page View Source

    Constant(double, int)

    Creates a vector of a constant value

    Declaration
    public static double[] Constant(double value, int N)
    Parameters
    Type Name Description
    double value

    constant value of time-series

    int N

    number of data points of time-series

    Returns
    Type Description
    double[]
    | Edit this page View Source

    CreateDateStampArray(DateTime, double, int)

    Create an array of DateTimes starting at t0 of length N and with sampling interval dT_s

    Declaration
    public static DateTime[] CreateDateStampArray(DateTime t0, double dT_s, int N)
    Parameters
    Type Name Description
    DateTime t0

    first datetime in the array to be created

    double dT_s

    sampling interval

    int N

    number of desired data points

    Returns
    Type Description
    DateTime[]
    | Edit this page View Source

    Noise(int, double, int?)

    Create a white-noise random time-series

    Declaration
    public static double[] Noise(int N, double noiseAmplitude, int? seed = null)
    Parameters
    Type Name Description
    int N
    double noiseAmplitude
    int? seed
    Returns
    Type Description
    double[]
    | Edit this page View Source

    Ramp(int, double, double, int, int)

    Create a ramp that starts at startVal and ends at endVal over N

    Declaration
    public static double[] Ramp(int nRamp, double startVal, double endVal, int nPadBegin = 0, int nPadEnd = 0)
    Parameters
    Type Name Description
    int nRamp

    the length in samples of the ramp(first value is startVal and lastVal is endVal)

    double startVal
    double endVal
    int nPadBegin

    the number of samples to pad the signal at the beginning with startVal

    int nPadEnd

    the number of samples to pad the signal at the end with endVal

    Returns
    Type Description
    double[]
    | Edit this page View Source

    RandomWalk(int, double, double, int?)

    Creates a random-walk time-series

    Declaration
    public static double[] RandomWalk(int N, double stepAmplitude, double startval = 0, int? seed = null)
    Parameters
    Type Name Description
    int N
    double stepAmplitude
    double startval
    int? seed
    Returns
    Type Description
    double[]
    | Edit this page View Source

    Sinus(double, double, double, int)

    Create an array representing a sinus

    Declaration
    public static double[] Sinus(double amplitude, double sinusPeriod_s, double dT_s, int N)
    Parameters
    Type Name Description
    double amplitude

    amplitude of sinus

    double sinusPeriod_s

    time for a complete 360 degree period of the sinus in seconds

    double dT_s

    the timebase

    int N

    number of desired data points in return array

    Returns
    Type Description
    double[]

    an array containing the specified sinus

    | Edit this page View Source

    Step(int, int, double, double)

    Create a step change vector of a given length N starting at value val1 and ending at val2, step occuring at index stepStartIdx

    Declaration
    public static double[] Step(int stepStartIdx, int N, double val1, double val2)
    Parameters
    Type Name Description
    int stepStartIdx

    index of step

    int N

    total time series length

    double val1

    value before step

    double val2

    value after step

    Returns
    Type Description
    double[]

    created vector, or null if inputs make no sense

    | Edit this page View Source

    ThreeSteps(int, int, int, int, double, double, double, double)

    Create a time-series with three step changes

    Declaration
    public static double[] ThreeSteps(int step1StartIdx, int step2StartIdx, int step3StartIdx, int N, double val1, double val2, double val3, double val4)
    Parameters
    Type Name Description
    int step1StartIdx
    int step2StartIdx
    int step3StartIdx
    int N
    double val1
    double val2
    double val3
    double val4
    Returns
    Type Description
    double[]
    | Edit this page View Source

    TwoSteps(int, int, int, double, double, double)

    Create a time-series with two step changes

    Declaration
    public static double[] TwoSteps(int step1StartIdx, int step2StartIdx, int N, double val1, double val2, double val3)
    Parameters
    Type Name Description
    int step1StartIdx

    index of first step change

    int step2StartIdx

    index of second step change

    int N
    double val1

    value before steps

    double val2

    value of first step

    double val3

    value of second step

    Returns
    Type Description
    double[]
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX