convert cartesian plot into frequency domain

조회 수: 3 (최근 30일)
Irena Chernova
Irena Chernova 2015년 2월 18일
답변: AR 2025년 4월 23일
How can I convert Cartesian plot into frequency domain?? Please, help!

답변 (1개)

AR
AR 2025년 4월 23일
We can use the Fast Fourier Transform, “fft” function to convert a cartesian plot into the frequency domain. It takes as input a vector or matrix containing the time-domain data and provides an output of the same size in the frequency domain.
Here is an example code to convert time domain data to frequency domain.
t = 0:0.001:1; % Time vector
x = sin(2*pi*50*t); % Example signal
N = length(x);
Fs = 1/(t(2)-t(1)); % Sampling frequency
X = fft(x);
f = (0:N-1)*(Fs/N);
magnitude = abs(X)/N;
half_N = floor(N/2)+1;
figure;
plot(f(1:half_N), magnitude(1:half_N));
xlabel('Frequency (Hz)');
ylabel('Magnitude');
title('Frequency Domain Representation');
To convert a Cartesian plot to the frequency domain, apply thefft to the y-data (the signal values), not to the plot itself. The x-axis of the original plot is typically time or space, and the y-axis is the signal amplitude.
For more information on “fft”, refer to the below documentation link:

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by