Write Matlab Code Only
Generate a multi-tone sinusoidal signal with f1=2000Hz and f2=4000Hz, then by sampling generate the Oversampled and Undersampled version of it and display the frequency response also.




clc
clear all
%% fso is the oversampling frequency
fso=15000;
%% time defined
to=0:1/fso:0.1;
%% multi tone signal defined
xo=sin(2*pi*2000*to)+sin(2*pi*4000*to);
%% fast fourier transform perform on the signal to find
%% frequency domain
fftxo=fft(xo)/length(xo);
%% fftshift shifts the transform toward the center
fo = linspace(-fso/2,fso/2,length(xo));
%% time domain representation of the oversampled signal
defined
subplot(4,1,1)
stem(to,xo);
%% xlabel ylabel are used for naming axis and plot
xlabel('time');
ylabel('magnitude');
title('time domain representation of the oversampled signal at
fs=15000Hz');
%% frequency domain representation of the oversampled signal
defined
subplot(4,1,2)
plot(fo,fftshift(abs(fftxo)));
%% xlabel ylabel are used for naming axis and plot
xlabel('frequency');
ylabel('magnitude');
title('frequency domain representation of the oversampled signal at
fs=15000Hz');
%% fsu is the undersampling frequency
fsu=3000;
%% time defined
tu=0:1/fsu:1;
%% multi tone signal defined
xu=sin(2*pi*2000*tu)+sin(2*pi*4000*tu);
%% fast fourier transform perform on the signal to find
%% frequency domain
fftxu=fft(xu)/length(xu);
%% fftshift shifts the transform toward the center
fu = linspace(-fsu/2,fsu/2,length(xu));
%% time domain representation of the undersampled signal
defined
subplot(4,1,3)
stem(tu,xu);
%% xlabel ylabel are used for naming axis and plot
xlabel('time');
ylabel('magnitude');
title('time domain representation of the undersampled signal at
fs=3000Hz');
%% frequency domain representation of the undersampled signal
defined
subplot(4,1,4)
plot(fu,fftshift(abs(fftxu)));
%% xlabel ylabel are used for naming axis and plot
xlabel('frequency');
ylabel('magnitude');
title('frequency domain representation of the undersampled signal
at fs=3000Hz');
Write Matlab Code Only Generate a multi-tone sinusoidal signal with f1=2000Hz and f2=4000Hz, then by sampling...
Write a Matlab code to generate the signal y(t)=10*(cos(2*pi*f1*t)+ cos(2*pi*f2*t)+ cos(2*pi*f3*t)), where f1=500 Hz, f2=750 Hz and f3=1000 Hz. Plot the signal in time domain. Sketch the Fourier transform of the signal with appropriately generating frequency axis. Apply an appropriate filter to y(t) so that signal part with frequency f1 can be extracted. Sketch the Fourier transform of the extracted signal. Apply an appropriate filter to y(t) so that signal part with frequency f2 can be extracted. Sketch the Fourier...
Need MatLab code
Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider the frequency of this sinusoid and use this information to select an appropriate time-step and time array that will allow this signal to be correctly represented and displayed on a new MATLAB figure window (display 4 periods of this wave only). Now set up an appropriate frequency array and use the fft() and fftshift() functions to generate and plot the Fourier Transform (magnitude spectra)...
Q: please solve using matlab code withe comment 1. Write the Matlab code to generate: x = cos(w1*t) + cos(w2*t); where, w1=7; w2=23; t = [0:0.005:2] 2. Plot the signal using sub plot a. in time domain b. in frequency domain 3) Sample the signal under different sampling conditions: a. Ts<1/2fm b. Ts=1/2fm c. Ts>1/2fm 4). Multiple plot: the signal sampled under sampling condition and the signal x a. in time domain b. in frequency domain c. Label and Title...
Part a: Write a Matlab code that generate Exponential Function. Part b Write a Matlab code that generate sinusoidal Function. Part c Write a Matlab code that generate Unit Ramp delay (shift) function
please answer all the question and print matlab code You need to design bandpass filter with lower cutoff freq. of 1000Hz and upper cutoff freq. of 3000Hz. Sampling freq. 10000Hz. Plot the freq. response in DB .Use MATLAB as needed a) FIR with Hamming window at least 7 taps b) IIR using Bilinear Transformation method not more than 2end order. c) Compare the frequency response “freqz” plots and which method you recommend and why? 2 graphs on this part. d)...
3) Develop Matlab code to plots of chirp signal and its FFT (sampling frequency-500 Hz, duration: 1 second, length of FFT 1024). Explain what chirp signal is and how it is using in industry
3) Develop Matlab code to plots of chirp signal and its FFT (sampling frequency-500 Hz, duration: 1 second, length of FFT 1024). Explain what chirp signal is and how it is using in industry
Write a MATLAB code for the question below.
There is an initial signal containing 60 Hz sinusoid of amplitude 0.8 and a 150 Hz sinusoid of amplitude 1.2 corrupted by a noise - using the randn command - (zero-mean white noise with variance of 4). Plot the noisy signal in the time domain. After that compute the Fourier transform -using the fft command of the noisy signal, compute the two-sided spectrum. Define the frequency domain f and plot the single-sided...
need matlab code
Exercise: Use MATLAB to generate a low frequency signal: xy(t) = 3 cos(1400) And a higher frequency signal: xz(t) = 2 cos(10,000st) Now add these two signals together to generate the dual-component signal: y(t) = 3 cos(14007a)+ 2 cos(10,000) Points to be addressed: Again, manually calculate the theoretical magnitude spectra of y(t) and show this in your report (use Microsoft Visio or similar for your diagram). Clearly label all axes! Contrast this working to what you see...
Create a file named “toneA.m” with the following MATLAB code: clear all Fs=5000; Ts=1/Fs; t=[0:Ts:0.4]; F_A=440; %Frequency of note A is 440 Hz A=sin(2*pi*F_A*t); sound(A,Fs); Type toneA at the command line and then answer the following: (a) What is the time duration of A? (b) How many elements are there in A? (c) Modify toneA.m by changing “Fs=5000” to “Fs=10000”. Can you hear any difference? (d) Create a file named “tone.m” with the following MATLAB code: function x = tone(frequency,...
Use MATLAB to generate code for this 4.Given the following functions: (1) f1 (x, y) = cos (3 x); (2) f2 (x, y) = cos (5 y); (3) f3 (x, y) = cos (3 x) cos (5 y); Please plot 3D plots/images for each of the functions. Please show your steps/ derivations to explain why you obtain those plots/figures.