Main Content

iscausal

Determine if data is causal at specified frequency

Since R2023a

    Description

    example

    result = iscausal(freq,data) returns true or 1 if the each entry in data is causal at the frequency specified in freq and false or 0 otherwise.

    example

    [result,resmat] = iscausal(freq,data) also returns the causality metric in resmat.

    [___] = iscausal(freq,data,tol) specifies the relative error tolerance of the underlying rational fit in tol.

    Examples

    collapse all

    Create a data variable representing an ideal delay.

    freq = linspace(0,1e9,1001).';
    data = exp(-1i*freq*1e-8);

    Determine causality of the data at the specified frequency.

    result = iscausal(freq,data)
    result = logical
       1
    
    

    Calculate the S-parameters of a four-port network.

    S = sparameters('default.s4p');

    Extract the frequencies and data from the sparameters object.

    freq = S.Frequencies;
    data = S.Parameters;

    Determine whether the data is causal and calculate the causality metric of each entry in the data.

    [result,resMat] = iscausal(freq,data)
    result = logical
       1
    
    
    resMat = 4×4
    
        0.9998    1.0000    0.9994    0.9999
        1.0000    0.9994    0.9998    0.9997
        0.9999    0.9997    0.9991    1.0000
        0.9986    0.9997    1.0000    0.9994
    
    

    Input Arguments

    collapse all

    Frequency of the data, specified as a vector or a 3-D matrix with nonnegative elements.

    Example: freq = linspace(0, 1e9, 1001).'

    Data Types: single | double

    Frequency-dependent data, specified as one of these:

    • Vector — data must be of the same length as freq

    • 3-D matrix — Third dimension of the matrix data must be of the same length as freq

    Example: data = exp(-1i*freq*1e-8)

    Data Types: single | double
    Complex Number Support: Yes

    Relative error tolerance, specified as a scalar less than or equal to zero and expressed dB.

    Example: tol = -40

    Data Types: single | double

    Output Arguments

    collapse all

    Result of causality test , returned as a numeric or logical 1 (true) or 0 (false).

    Causality metric of each entry in the data, returned as a scalar, vector, or matrix of 0 and 1. 0 represents a perfectly noncasual result and 1 represents a perfectly causal result.

    Version History

    Introduced in R2023a

    See Also