How to compute the magnitude and phase difference of an input and output signal in a single time-domain plot?

23 views (last 30 days)
How to compute the magnitude and phase difference of an input and output signal in a single time-domain plot?
I have used symbolic math to define an time-domain sinusoid frequency as an input to a given transfer function. I then calculate the output signal using convolution and then used it to produce a time domain plot by using the subs() and double() function to convert the singnals from symbolic to double precision before plotting.
I was able to produce a plot of the input and output signals in the time domain, but am unsure how to compute the magnitude and phase difference of the input and output signals.
  3 Comments
Shikhar Singh
Shikhar Singh on 31 Oct 2021
I am trying to use the time domain plot to determine the magnitude and the phase difference between the input and output signal, as opposed to using the bode function to output the mag and phase. How would I go about doing that.
VBBV
VBBV on 31 Oct 2021
Once you know bode function outputs, for mag and phase, apply fft /ifft functions on the obtained data to convert them to time domain.

Sign in to comment.

Answers (1)

Star Strider
Star Strider on 31 Oct 2021
See if the alignsignals function will produce the relevant phase information (with respect to the index difference). Without actually seeing the signals, much less having the data to experiment with, posting a more precise response is not possible.
.

Products

Community Treasure Hunt

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

Start Hunting!