1. Submit MATLAB programs and their plots of the following sequences over the indicated interval. (a) x(n) = 28(n + 2)-8(n-4), -5 ≤ n ≤ 5. 0 ≤n ≤ 20. (b) x(n) = n[u(n)-u(n-10)] 2. It is useful to plot the continuous time signal on the same plot. All signals in MATLAB are discrete-time, but they will look like continuous-time signals if the sampling rate is much higher than the Nyquist rate. Please fill in the "Problem to solve" region below to show the Nyquist rate. Submit the final code and its graph.
Need help with the question being ask for this MATLAB practice. Using version R2021b.
Question/request is in the image for the following code.
clear;
close all
%%
f0 = 2000; % signal freq. = 2 kHz
T = 1/f0;
tmin = 0;
tmax = 5*T;
%%
dt = 1/200000;
t = tmin:dt:tmax; % for continuous signal
fs1 = 10000; % sampling exmple1 = 10kHz
t1 = tmin:(1/fs1):tmax; %
x1 = sin(2*pi*f0*t1);
x = sin(2*pi*f0*t); % continuous signal
%% Nyquist rate
% Problem to solove
% fs_Ny =
% t_Ny = tmin:(1/fs_Ny):tmax; %
% x_Ny = sin(2*pi*f0*t_Ny);
%%
subplot(2,1,1)
plot(t,x); % continuous signal
hold on
stem(t1,x1); % 10kHz sampling
title('10kHz sampling frequency')
% Problem to solove
% subplot(2,1,2)
% plot(t,x);
% hold on
% stem(t_Ny, x_Ny);
![clear;
close all
fe = 2000; % signal freq. 2 kHz
T = 1/f0;
tmin = 0;
tmax = 5*T;
%%
%670
dt = 1/200000;
t = tmin:dt: tmax; % for continuous signal
fs1 = 10000; % sampling exmple1 = 10kHz
t1 = tmin: (1/fs1): tmax; %
x1 = sin(2*pi*f*t1);
X = sin(2*pi*fø*t); % continuous signal
%% Nyquist rate
% Problem to solove
% fs_Ny =
% t_Ny = tmin: (1/fs_Ny): tmax; %
% x _Ny = sin(2*pi*f*t_Ny);
%%
subplot (2,1,1)
plot (t, x);
hold on
% continuous signal
% 10kHz sampling
stem (t1, x1);
title('10kHz sampling frequency')
% Problem to solove
% subplot (2,1,2)
% plot(t, x);
% hold on
% stem (t_Ny, x_Ny);
Open with
Page 2 / 2
Q +](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1296c196-158c-4a2c-9587-82b5996e9fed%2Fa8852650-f43e-4d47-be53-ab14d8e5b174%2F2vtsk98_processed.png&w=3840&q=75)
![1. Submit MATLAB programs and their plots of the following sequences over the indicated interval.
(a)
x(n) = 28(n+2) -8(n-4), -5≤n ≤ 5.
x(n) = n[u(n)-u(n-10)] 0 ≤ n ≤ 20.
(b)
2. It is useful to plot the continuous time signal on the same plot. All signals in MATLAB are discrete-time, but they will
look like continuous-time signals if the sampling rate is much higher than the Nyquist rate. Please fill in the "Problem to
solve" region below to show the Nyquist rate. Submit the final code and its graph.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F1296c196-158c-4a2c-9587-82b5996e9fed%2Fa8852650-f43e-4d47-be53-ab14d8e5b174%2Fmslijm_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)