% Drawing unit Impulse Function in DTS clc;clear;close all n=-10:10; delta=zeros(size(n)); a=input('please enter the value of shifting (a) to represent delta(t-a): a= '); for i=1:21 if n(i)== a delta(i)=1; end end stem(n,delta,'filled','r','linewidth',2) grid title('Discrete Time Unit Impulse Function') xlabel('time') ylabel('Unit Impulse')
Yup I got it thanks
yup we got it!
How can i express x(t) in terms of ramp unit and delta from graph in matlab ...only the final equation??
is there an arrangement in variables in the function? tried to interchange n,x to x,n it does not follow the values when interchanged.
How to generate a signal Dirac (t-3) using Zeros function Matlab
% Drawing unit Impulse Function in DTS
clc;clear;close all
n=-10:10;
delta=zeros(size(n));
a=input('please enter the value of shifting (a) to represent delta(t-a): a= ');
for i=1:21
if n(i)== a
delta(i)=1;
end
end
stem(n,delta,'filled','r','linewidth',2)
grid
title('Discrete Time Unit Impulse Function')
xlabel('time')
ylabel('Unit Impulse')