File Exchange

image thumbnail

mainfrequency(x, y, TDx, Fs)

version 1.1 (1.73 KB) by Davide Vatteroni
This function finds the main frequency of a signal

1 Download

Updated 26 Nov 2018

View License

Mainfrequency finds the main frequency (and its standard deviation) of a signal y, sampled in a interval x (of time) with Fs as sampling rate. If you don't know the sampling rate, set Fs equal to zero (if so, x must be in seconds). TDx is the flag of x, and it can be "Second" or "Data". Also it returns the plots "amplitude vs. time" & "magnitude vs. frequency". If there are two or more peaks with the same height, it chooses the lower one in frequency. Finally it returns the total power P of the signal.

Cite As

Davide Vatteroni (2020). mainfrequency(x, y, TDx, Fs) (https://www.mathworks.com/matlabcentral/fileexchange/64567-mainfrequency-x-y-tdx-fs), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

Updates

1.1

Better estimate of the standard deviation

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux