MATLAB Answers

Separate a time signal for each frequency

조회 수: 4(최근 30일)
Erik Nilsson
Erik Nilsson 2020년 10월 26일
답변: Star Strider 2020년 10월 26일
I have a signal with acceleration over time and the auto spectrum (acceleration over frequency) for the same signal. The time signal is 1 second long and the auto spectrum goes up to 3200 Hz with an intervall of 1 Hz. I want to write a code so that I get a time signal for each frequency. Is this possible and which functions should I use? The code below displays 9 different time signals. The auto spectrum is not in this code.
I have tried to do this using the spectrogram function but can't make it work. I can display the draft of my code below. Is this the right function or how can I do this better? Please help me to solve this. When using the spectrogram function, the time signal goes up to 1,26 seconds even though my measurements only goes up to 1 second... And I want to have acceleration over time for each frequency, not the Power/frequency as I get with this code.
T = readtable('Measurement-1-dot.csv');
A = table2array(T);
Fs = 6400; % Sampling frequency

채택된 답변

Star Strider
Star Strider 2020년 10월 26일
The pspectrum function (introduced in R2017b) with the 'spectrogram' type may be what you want. It produces a spectrogram plot and spectrogram output (if you ask it to), however with completely different units and resolution than the spectrogram function that you are currently using.

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by