Question

Its related to MATLAB

Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of the followings. a >>t0:0.001

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Matlab code for continuous and discrete signal plot clear all close all Answering question a %function for continuous signalt vs. x(t) plot 1.5 0.5 -0.5 .1 0 03 04 05 0608 0.9 Discrete x plot 025 0.2 0.15 0.1 0.05 -5 10 x(n)

%%Matlab code for continuous and discrete signal plot
clear all
close all

%Answering question a.

%function for continuous signal
x=@(t) cos(2*pi*10.*t+pi/4)+cos(2*pi*30.*t+pi/4);

t=0:0.001:1;
x_t=x(t);

figure(1)
plot(t,x_t)
xlabel('t')
ylabel('x(t)')
title('t vs. x(t) plot')

%Answering question b.

n = [-5 -4 -3 -2 -1 0 1 2 3 4 5 7 8 9 10];
x_n = (1/4)*(heaviside(n)-heaviside(n-4));
figure(2)
stem(n,x_n)
xlabel('x(n)')
ylabel('n')
title('Discrete x_n plot')

%%%%%%%%%%%%% End of Code %%%%%%%%%%%%

Add a comment
Know the answer?
Add Answer to:
Its related to MATLAB Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT