I have a signal in time domain (6000 samples from -100 to 1100 ps). I have to convert it into frequency domain and divide it into 100 channels, and find the center frequency of each channel.
I am not good in "MATLAB" so how to do that, help will be appreciated.
Based on my understanding of the question, you want to represent your signal in the frequency domain. Please study some tutorials on FFT to increase your understanding of the FFT details. A good start is this tutorial: FFT Tutorial using Matlab, which I used to write the code below.
close all;
clear all;
clc;
Fs = 5; % Sampling frequency (in THz)
Ts = 1/5; % Sampling period (in ps)
x = randn(1, 6000); % A random signal of 6000 points
t = [-100:Ts:1100-Ts]; % 6000 time points (in ps)
% Plot signal in time domain
figure;plot(t,x);
xlabel('Time (ps)'); ylabel('Signal');
N = 100; % Number of FFT points
X = fftshift(fft(x, N)); % Compute and shift FFT
absX = abs(X); % Compute absolute FFT values
% Frequency centers (frequency components) depend on the values of N and Fs
frequency_centers = Fs * [-N/2:N/2-1]/N;
% Plot signal in frequency domain
figure;plot(frequency_centers, absX);
xlabel('Frequency (THz)'); ylabel('abs FFT');
The variable frequency_centers shows the frequency components.
Since you have 6000 time samples, from -100 to 1100 ps, the sampling period is Ts = 1200/6000 = 0.2 ps and Fs = 1/Ts = 5 THz. Also, note that in order to have 6000 time samples (and not 6001), you need to drop one boundary time value (here I dropped 1100).