how to plot continous time signal and descrete time signal?

39 views (last 30 days)
1. You are given the following continuous-time signals.
10cos(t), 12cos(2*t),
Please note this was a typo: 10(cos(t) + 12cos(2*t))
It should read: 10cos(t) + 12cos(2*t) In the practical test, either answer will be accepted.
Determine the period of the composite signal using labeled Matlab plots and by hand.
2. You are given the following discrete-time signal.
𝑦[𝑛] = 18 sin (2𝜋n / 16 ) for n = 0 to 48
Determine signal period using labeled Matlab plots and by hand.

Answers (1)

Hornett
Hornett on 17 Nov 2023
Edited: Hornett on 17 Nov 2023
I understand that you want to plot the above functions on MATLAB and verify. To plot the continuous-time signal and discrete-time signal, you can use MATLAB. Here are the steps to plot each signal:
1. Continuous-Time Signal:
% Define the time range
t = 0:0.01:10; % Adjust the time range as needed
% Define the continuous-time signal
x = 10*cos(t) + 12*cos(2*t);
% Plot the continuous-time signal
plot(t, x);
xlabel('Time');
ylabel('Amplitude');
title('Continuous-Time Signal');
By observing the plotted signal, you can estimate the period visually. The period is the time it takes for the signal to repeat its pattern. In this case, you can see that the composite signal repeats approximately every 2*pi seconds.
To determine the period by hand, you can find the smallest positive value of T for which the signal satisfies x(t + T) = x(t). In this case, you need to solve the equation 10*cos(t + T) + 12*cos(2*(t + T)) = 10*cos(t) + 12*cos(2*t). By analyzing the equation, you can see that T = 2*pi satisfies this condition. Therefore, the period of the composite signal is 2*pi.
2. Discrete-Time Signal:
% Define the time range
n = 0:48;
% Define the discrete-time signal
y = 18*sin(2*pi*n/16);
% Plot the discrete-time signal
stem(n, y);
xlabel('n');
ylabel('Amplitude');
title('Discrete-Time Signal');
By observing the plotted signal, you can estimate the period visually. The period is the number of samples it takes for the signal to repeat its pattern. In this case, you can see that the signal repeats every 16 samples.
To determine the period by hand, you can find the smallest positive value of N for which the signal satisfies y[n + N] = y[n]. In this case, you need to solve the equation 18*sin(2*pi*(n + N)/16) = 18*sin(2*pi*n/16). By analyzing the equation, you can see that N = 16 satisfies this condition. Therefore, the period of the discrete-time signal is 16.
By plotting the signals and analyzing them, you can determine the periods both visually and by hand calculations. I hope it helps

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!