time-frequency shifted gaussian function

2 次查看(过去 30 天)
I am trying to implement a function that generates a cyclic time and frequency shifted version of a gaussian function.
When I plot the function, the function looks like the one on the left while I desire to have a plot as shown on the right. Can somebody suggest me how can I attain the desired plot?
Following is my matlab code: clc close all
L = 256; % Length of the signal
% Define Parameters
a = 12; %time hop
b = 16; %frequency hop
M = L/b;
m = 0; % frequncy index
n = 0; % time index
sigma = 50;
fxn =zeros(L,1);
l=0:L-1;
for i=1:length(l)
fxn(i,1) = exp(-pi*((l(i)-n*a)^2)/(sigma^2)) * exp(1i*2*pi*m*(l(i)-n*a)/L);
end
fxn = (1/norm(fxn)) .* fxn; %Normalization

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

标签

产品


版本

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by