Signal Scaling function |In MATLAB | code

Write the codes to scale the given signal for signal stretch and signal shrink.

 Signal Scaling function 

[y,n] = scale(x,m,n0)

 % function of time scaling,

 y = x; 

n = m*n0; 

end

code

 

clc

clear all

t=-10:1:10

x=[zeros(1,8) 3 2 1 -1 -2 zeros(1,8)]

subplot(211)

stem(t,x)

title('graph')

xlabel('x axis')

ylabel('yaxis')

legend('IBRAR')

f=fliplr(x)

subplot(212)

stem(t,f)

title('graph')

xlabel('x axis')

ylabel('yaxis')

legend('IBRAR')

output




Post a Comment

0 Comments