Hello, I have questions on Matlab. Let's say that I have an equation. Signal x(t)= cos(2*pi*10*t) is sampled at sampling frequency of Fs=100 Hz. How do I both Upsample and downsample this frequency by a factor of 2 in Matlab? I need to see the code and how the graphs look. Thank you for the help.
Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks
In matlab we have :
upsample
Increase sample rate by integer factor
downsample
Decrease sample rate by integer factor
Code:
Fs = 100;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*10*t);
y = upsample(x,2);
y2= downsample(x,2);
subplot(3,1,1)
stem(t(1:50),x(1:50),'filled','markersize',3)
grid on
xlabel 'Sample number',ylabel Original
subplot(3,1,2)
stem(t(1:50),y(1:50),'filled','markersize',3)
grid on
xlabel 'Sample number',ylabel UpSample
subplot(3,1,3)
stem(t(1:50),y2(1:50),'filled','markersize',3)
grid on
xlabel 'Sample number',ylabel DownSample
Hello, I have questions on Matlab. Let's say that I have an equation. Signal x(t)= cos(2*pi*10*t)...
3. (50 points] Consider the signal (t= cos(27 (100)+]: 1) Let's take samples of x(t) at a sampling rate fs = 180 Hz. Sketch the spectrum X (f) of the sampled signal x (t). Properly label x-axis and y-axis. 2) Now suppose we will use an ideal lowpass filter of gain 1/fs with a cutoff frequency 90 Hz for the sampled signal xs(t). What is the output of the filter x,(t)? 3) Now let's take samples of x(t) at 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...
g1(t) = cos(40*pi*t); g2(t) =
cos(60*pi*t); g3(t) = cos(160*pi*t); a. Using a sampling period of
1.0 ms to simulate the continuous-time signal, in Matlab generate
and plot the analog signal described in Problem 2 Part (a) over the
interval 0 ? t ? 300ms, and overlay the plotted signal with the
equivalents of its sampled versions. Denote the latter with
different symbols (e.g., open circles, diamonds, etc). b. Repeat
for g2 (t) and g3 (t) described in Problem 2 on...
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.
Q1) Given an analog signal X(t) = 3 cos (2π . 2000t) + 2 cos (2π . 5500t) sampled at a rate of 10,000 Hz, a. Sketch the spectrum of the sampled signal up to 20 kHz; b. Sketch the recovered analog signal spectrum if an ideal lowpass filter with a cutoff frequency of 4 kHz is used to filter the sampled signal in order to recover the original signal ; c. Determine the frequency/frequencies of aliasing noise . Q2)...
Consider a sampler which samples the continuous-time input signal x(t) at a sampling frequency fs = 8000 Hz and produces at its output a sampled discrete-time signal x$(t) = x(nTs), where To = 1/fs is the sampling period. If the sampled signal is passed through a unity-gain lowpass filter with cutoff frequency of fs/2, sketch the magnitude spectrum of the resulting signal for the following input signals: (a) x(t) = cos(6000nt). (b) x(t) = cos(12000nt). (c) x(t) = cos(18000nt).
The signal x(t) 10 cos(2t (3300) t +0.2x)) is sampled at fs 8 kHz (a) Determine the sampled signal x[n]. (b) What would be the lowest possible sampling frequency for reconstructing x(0)? 4.
MATLAB Fourier transform. Suppose that a signal x(t) is sampled
with sampling frequency fs =100Hz.
The sequence x[n] obtained after the sampling is given below:
Take the DFT of the sampled sequence and plot
its magnitude and phase.
What is the frequency resolution (Δf) of your plot?
N= 20, 100 Hz
N= 20, 100 Hz
Help solve in MATLAB
1. Let m(t) be the 2-bit modulating signal and s(t) cos(at) be carrier signal as shown in Figure 3. Plot these two signals in 2 separated figures using MATLAB with a, = 600Or rad/s and t = 0:7, :0.01 sec where fs = 10MHz be the sampling rate to satisfy Nyquist theorem. Use the zoom in tool of MATLAB to clearly look at the signal if necessary. You can use the MATLAB function below to produce...
I wrote a Matlab program for the figure below. When I plot the waves, they look the same. Why do the two waves frequencies look same and How do I avoid it? (I really do need this part of the question answered.) N = 200; % Total number of time domain samples in simulation. Fs = 100 ;% sampling frequency. F1 = 10; % frequency of wave - 1. F2 = 90; % frequency of wave - 2. phi =...