# Calculate amplitude of noise added Sine Gaussian signal from frequency domain

How to calculate the time domain amplitude of noise added Sine Gaussian signal from corresponding frequency domain. Here time domain amplitude is 2. How to get this from frequency domain.

N = 4096;
Samplingfrequency= 1024;
timelength=N/Samplingfrequency;

% Generate random
Noise=rand(1,N)*.1;

t    = linspace(-timelength/2,timelength/2,N);
Freq=(1/timelength)*[0:N/2-1 -N/2:-1];

signalFrequency = 64 ;
amplitude=2;
Q=10;
tau  = Q /(2 * pi * signalFrequency);

%Sine Gaussian
Gaussian=((amplitude*exp(-1 .* ((t)/tau).^2) .* cos(2 * pi * signalFrequency .* t))+Noise);

%Time Domain
subplot(2,1 ,1)
plot(t,Gaussian);

%Frequency Domain
FFTGaussian=abs(fft(Gaussian));

subplot(2,1 ,2)
% One sided frequency domain plot
plot(Freq(2:N/2),FFTGaussian(2:N/2));

• The noise in your example is uniform. I assume you want to use randn for Gaussian noise. – Harris Sep 8 '15 at 19:53
• The way you've used uniformly distributed noise, it will have both a non-zero mean and variance. The mean will lead to a influence the DC value in the frequency domain. You'll need to estimate the mean before estimating the variance. – David Dec 7 '15 at 18:03