Code

Decimation or Downsampling in scilab

Senthilkumar March 21, 20112 comments Coded in Scilab

This program perfoms Multirate Signal Processing in scilab - Downsampling a sinusoidal signal by a factor of 2

//Multirate Signal Processing in scilab
//Downsampling a sinusoidal signal by a factor of 2
clear;
clc;
n = 0:%pi/200:2*%pi;
x = sin(%pi*n);   //original signal
downsampling_x = x(1:2:length(x)); //downsampled by a factor of 2
subplot(2,1,1)
plot(1:length(x),x);
xtitle('original singal')
subplot(2,1,2)
plot(1:length(downsampling_x),downsampling_x);
xtitle('Downsampled Signal by a factor of 2');