Pulse Signal using Matlab. Consider a pulse signal x(t) = Acos(ohm_0 t)(u(t) - u
ID: 1840863 • Letter: P
Question
Pulse Signal using Matlab.
Consider a pulse signal x(t) = Acos(ohm_0 t)(u(t) - u(t - tau)). Generate this signal (its discrete version) using MATLAB for arbitrary constants A (magnitude), ohm_0 (frequency), and tau (duration). To illustrate correct functionality of your code, plot the signal x(t) for a few values of A, ohm_0, and tau. Evaluate the Fourier transform of x(t) in MATLAB. What conclusions can you make based on the results you observed? Write a short report with the MATLAB codes you developed and the results you observed. Explain the procedure, discuss the results and conclusions.Explanation / Answer
clear all;
close all;
clc;
x1=input('enter the first sequence');
x2=input('enter the second sequence');
l=length(x1);
m=length(x2);
g=wrev(x2);
x1=[x1 zeros(1,(m-1))];
g=[g zeros(1,(l-1))];
x1=fft(x1);
g=fft(g);
y=x1.*g;
y=ifft(y);
subplot(3,1,1);
stem(x1);
xlabel('time');
ylabel('amplitude');
subplot(3,1,2);
stem(g);
xlabel('time');
ylabel('amplitude');
subplot(3,1,3);
stem(y);
xlabel('time');
ylabel('amplitude');
title('cross correlation');
gtext('kluniversity')
part1:
x = linspace(0, 2*pi, 10);
A=2
y =A.* cos(x);
plot(x,y)
xlabel('x')
ylabel('cos(x)')
title('Plotting a cosine')
grid on
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.