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');

Comments:

Vijay Karthik
Said:
Hello,
Thanks for your code. However I need to implement the decimation operation in xcos. what type of block should I use for the decimation operation. Help is appreciated.

Thanks,
Vijay
3 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
Vijaykarthik
Said:
Hello,
Thank you for the code. However, I need to implement the decimation operation in xcos. I tried this by implementing the 1/z as well as the delay block, but the decimation operation is not working properly. A better method than this would be helpful. Help is appreciated.

Thanks,
Vijay
3 years ago
0
Reply
Sorry, you need javascript enabled to post any comments.
Sorry, you need javascript enabled to post any comments.