Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Decimation or Downsampling in scilab

Decimation or Downsampling in scilab

Language: Scilab

Processor: Not Relevant

Submitted by Senthilkumar R on Mar 21 2011

Licensed under a Creative Commons Attribution 3.0 Unported License

Decimation or Downsampling 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');
 
Rate this code snippet:
0
Rating: 0 | Votes: 0
 
   
 
posted by Senthilkumar R



Comments


No comments yet for this code


Add a Comment
You need to login before you can post a comment (best way to prevent spam). ( Not a member? )