Sign in

username or email:

password:



Not a member?
Forgot your password?

Search code



Search tips

Ads

See Also

Embedded SystemsFPGA

DSP Code Sharing > Interpolation or upsampling in scilab

Interpolation or upsampling 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

Interpolation or upsampling in scilab


 

This program performs Multirate Signal Processing in scilab - Upsampling a sinusoidal signal by a factor of 2

 
//Multirate Signal Processing in scilab
//Upsampling a sinusoidal signal by a factor of 2
clear;
clc;
n = 0:%pi/200:2*%pi;
x = sin(%pi*n);   //original signal
upsampling_x = zeros(1,2*length(x)); //upsampled by a factor of 2
upsampling_x(1:2:2*length(x)) = x;
subplot(2,1,1)
plot(1:length(x),x);
xtitle('original singal')
subplot(2,1,2)
plot(1:length(upsampling_x),upsampling_x);
xtitle('Upsampled 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? )