decimation and interpolation in matlab

Post on 04-Nov-2015

23 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Matlab code for decimation and interpolation.

TRANSCRIPT

clc; clear all; close all;x=input('Enter sequence:');N=length(x);ch=input('1. decimation 2.interpolation...enter choice:');switch(ch) case 1n=input('Enter decimation factor:');m=ceil(N/n);y=zeros(1,m);k=1;for i=1:m if(k

top related