image thumbnail

Time scaling for discrete signals

by

 

To perform Time scaling on discrete time signals

timescald.m
clear all;
close all;
clc;
k=2;
x1=[1 2 3 4 5];
a=length(x1);
n=0:1:a-1;
subplot(3,1,1);
stem(x1);
xlabel('number of samples');
ylabel('amplitude');
title('input signal');
x2=k*x1;
subplot(3,1,2);
stem(x2);
xlabel('number of samples');
ylabel('amplitude');
title('amplified signal');
x3=x1/k;
subplot(3,1,3);
stem(x3);
xlabel('number of samples');
ylabel('amplitude');
title('attenuated signal');
display(x1);
display(x2);
display(x3);

Contact us