Amplitude=3;
fs=8000;
n=0:399;
t=0:1/fs: n*1/fs-1/fs;
signal=3+3*cos(2*pi*1100*t)+3*cos(2*pi*2200*t)+3*cos(2*pi*3300*t);
fftSignal= fft(signal);
fftSignal=f ftshift (fftSignal);
f=fs/2*linspace(-1,1,fs);
plot(f,abs(fftsignal);
xlabel('Frequency(Hz)’)
ylabel('amplitude(v)')
title('Spectral domain')
plz code above using For ..End loop to archive the same results.
Amplitude=3;
fs=8000;
for n=0:399
t=0:1/fs: n*1/fs-1/fs;
signal=3+3*cos(2*pi*1100*t)+3*cos(2*pi.*2200*t)+3*cos(2*pi*3300*t);
fftSignal= fft(signal);
fftSignal=fftshift (fftSignal);
f=fs/2*linspace(-1,1,fs);
plot(f,abs(fftsignal)
hold on;
xlabel('Frequency(Hz)’);
ylabel('amplitude(v)');
title('Spectral domain');
end
Amplitude=3; fs=8000; n=0:399; t=0:1/fs: n*1/fs-1/fs; signal=3+3*cos(2*pi*1100*t)+3*cos(2*pi*2200*t)+3*cos(2*pi*3300*t); fftSignal= fft(signal); fftSignal=f ftshift (fftSignal); f=fs/2*linspace(-1,1,fs); plot(f,abs(fftsignal); xlabel('Frequency(Hz)’) yla
Why we define ''f'' with between -fs/2 and fs/2.
%fft DSB modulation; ts-1/fs tmax-(N-1)*ts; t-0:ts:tmax f--fs/2:fs/(N-1):fs/2; y2-fftshiftlftlv subplot(10,1,6) plot(f,y2) title('fft DSB Modulation of Signal'
%fft DSB modulation; ts-1/fs tmax-(N-1)*ts; t-0:ts:tmax f--fs/2:fs/(N-1):fs/2; y2-fftshiftlftlv subplot(10,1,6) plot(f,y2) title('fft DSB Modulation of Signal'
Program from problem 1: (Using MATLAB)
% Sampling frequency and sampling period
fs = 10000;
ts = 1/fs;
% Number of samples, assume 1000 samples
l = 1000;
t = 0:1:l-1;
t = t.*ts; % Convert the sample index into time for generation and
plotting of signal
% Frequency and amplitude of the sensor
f1 = 110;
a1 = 1.0;
% Frequency and amplitude of the power grid noise
f2 = 60;
a2 = 0.7;
% Generating the sinusoidal waves...
Can you please help me answer Task 2.b?
Please show all work.
fs=44100; no_pts=8192;
t=([0:no_pts-1]')/fs;
y1=sin(2*pi*1000*t);
figure;
plot(t,y1);
xlabel('t (second)')
ylabel('y(t)')
axis([0,.004,-1.2,1.2]) % constrain axis so you can actually see
the wave
sound(y1,fs); % play sound using windows driver.
%%
% Check the frequency domain signal. fr is the frequency vector and
f1 is the magnitude of F{y1}.
fr=([0:no_pts-1]')/no_pts*fs; %in Hz
fr=fr(1:no_pts/2); % single-sided spectrum
f1=abs(fft(y1)); % compute fft
f1=f1(1:no_pts/2)/fs;
%%
% F is the continuous time Fourier. (See derivation...
Exercises: u used to the instructor b the end of next lab. 20 102 Plot the f(t)-sinc(20r) cos(300t)sinc (10t) cos(100t) Use the fast Fourier transform to find the magnitude and phase spectrum of the signal and plot over an appropriate range. Use appropriate values for the time interval and the sampling interval. Note that in Matlab sinc(x)-, so we need to divide the argument by n to make it match the given function. Le, sinc(20t/pi) Hint: Use the parameters from...
Problem 2 (Spectrum of a rectangular signal): In this problem, the amplitude spectrum of the signal 1 or Ot 2 ms x(t)- 0 otherwise is to be analysed (b) Numerical calculation of the spectrum: (i) Use Matlab to generate and plot a vector containing the sample values of the rectangular signal defined in (2) sampled at f 8kHz. Choose the number N of sample values so that it is a power of 2 and that the signal duration is at...
matlab help, please
my code is here:
%% exercise2
%a
Fs = 8000; % sampling frequency
tn = 0:1/Fs:0.005; % here, bit duration is 0.005s instead of
1/300s
phi1 = 0; phi0 = 0; % phases of the sinusoid
x1 = cos(2*pi*1650*tn + phi1); % tone for binary 1
x0 = cos(2*pi*1850*tn + phi0); % tone for binary 0
xx = [x1, x0]; % FSK signal for ¡°1,0¡±
tt = [tn, tn + 0.005]; % time
figure(1)
plot(tt, xx); %...
1) Find out the amplitude, frequency and phase displacement for given QPSK signal F(t)=100 cos(25t+π/4). 2) For given data incorporate with odd parity and even parity (a) 11011011 (with parity bit) (b) 1 11011011 (without parity bit)