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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191635/image.png)
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/191636/image.png)
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!