Best way to plot spectogram of multiple single frequency inputs (0.05hz, 0.1hz, 0.15hz etc) and corresponding output data

1 view (last 30 days)
I have multiple sets of input/output data for different frequencies of input. All input signals correspond to a frequency and I have output data (temperature against time) for each input. how do i plot a spectogram using this data to get an understanding of the system.

Answers (1)

Devineni Aslesha
Devineni Aslesha on 3 Dec 2019
Use the spectrogram function to plot the spectrogram of multiple single frequency inputs. Define the input signal with different single frequency inputs (0.05 Hz, 0.1 Hz, 0.15 Hz) and use the below code to plot the spectrogram.
N = 1024;
n = 0:N-1;
x = sin(0.05*n)+sin(0.1*n)+sin(0.15*n);
s = spectrogram(x);
The above code gives the Samples vs Frequency spectrogram plot. The output data can be configured as Samples/ time based as needed.
Use the following link for more information.

Tags

Community Treasure Hunt

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

Start Hunting!