How to do fast fourier analysis of first harmonic in matlab?

조회 수: 21 (최근 30일)
Davide Cannavacciuolo
Davide Cannavacciuolo 2024년 6월 17일
답변: Ayush Singh 2024년 6월 18일
In simulink there is a block called, Fast Fourier Analysis, that given the fundamental frequency it extracts the phase delay and the magnitude amplification. I need to do the same thing in matlab, how can i do it? The harmonics of which I would like to extract the information it is just the first one. Is there a function or a specific code that i can use?
The data signal would then be given as input as an array with the relative time.

답변 (1개)

Ayush Singh
Ayush Singh 2024년 6월 18일
Hey Davide,
To perform a task similar to Simulink's Fast Fourier Transform (FFT) analysis in MATLAB and extract the magnitude and phase of the fundamental frequency from a signal, you can use MATLAB's built-in 'fft' function. Given a time-domain signal and its sampling frequency, you can calculate the FFT, and from that, determine the magnitude and phase of any harmonic, including the first one (fundamental frequency).
Please refer to following documentation on how to use the 'fft' function:
Hope it gives you the necessary resolution!

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by