Clear Filters
Clear Filters

Getting magnitudes from frequency spectrum

2 views (last 30 days)
The amplitude of a variable is the measure of how far, and in what direction, that variable differs from zero. Thus signal amplitudes can be either positive or negative. The magnitude of a variable, on the other hand, is the measure of how far, regardless of direction, its quantity differs from zero. So magnitudes are always positive values.
I assumed, if i apply a fft on my signal, then i get a two-sided frequency spectrum, therefore i cut off the one side, which only contains complex values. Then i used the fucntion "abs" on my one-sided spectrum. So, that all values are converted to positive values. How can I get all the positive values from one frequency spectrum and get the next values from another frequency spectrum, when i plot several of them, every 100 ms?

Answers (1)

Cyriac Jose
Cyriac Jose on 6 Sep 2018
I have a set of 50Hz Voltage and Current values stored as arrays under variable name 'Volt' and 'Cur' sampled at 1000 Hz
Things to be obtained:
1. Extract the 50 Hz component out of the whole load data in turn. Require a sliding window of 20 ms taking the 50 Hz component of the vector for that sliding window and do the fft of that vector and store it in a separate array.
2. Simliary take 50 Hz component of every 20 ms window and store the same to the array. Can spectrogram do the same?

Tags

Community Treasure Hunt

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

Start Hunting!