TransferFunction
Advanced Analysis Library Only
AnalysisLibErrType TransferFunction (double stimulusArray[], double responseArray[], ssize_t numberOfElements, double dt, double magnitudeOfHf[], double phaseOfHf[], double *df);
Purpose
Calculates the single-sided transfer function, also known as the frequency response, from the time-domain stimulus signal and the time-domain response signal of a network under test.
TransferFunction calculates the transfer function Hf as follows:

and transforms this result to single-sided magnitude and phase.
Parameters
Input | ||
Name | Type | Description |
stimulusArray | double [] | The time-domain signal, usually the network stimulus. |
responseArray | double [] | The time-domain signal, usually the network response. |
numberOfElements | ssize_t | Number of elements in the input stimulus and response arrays. Default Value: 1024. |
dt | double | Sampling period of the time-domain signals, usually in seconds. dt = 1/fs, where fs is the sampling frequency of the time-domain signals. Default Value: 1.0. |
Output | ||
Name | Type | Description |
magnitudeOfH_f | double [] | Magnitude of the averaged single-sided transfer function between the stimulus and response signals. This array must be at least numberOfElements/2 elements long. |
phaseOfH_f | double [] | Phase, in radians, of the averaged single-sided transfer function between the stimulus and response signals. This array must be at least numberOfElements/2 elements long. |
df | double | Points to the frequency interval, in Gertz, if dt is in seconds. df = 1/(numberOfElements × dt) |
Return Value
Name | Type | Description |
status | AnalysisLibErrType | A value that specifies the type of error that occurred. Refer to analysis.h for definitions of these constants. |
Additional Information
Library: Advanced Analysis Library
Include file: analysis.h
LabWindows/CVI compatibility: LabWindows/CVI 3.1 and later