diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /40/CH7/EX7.6/Exa_7_6.sce | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '40/CH7/EX7.6/Exa_7_6.sce')
-rwxr-xr-x | 40/CH7/EX7.6/Exa_7_6.sce | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/40/CH7/EX7.6/Exa_7_6.sce b/40/CH7/EX7.6/Exa_7_6.sce new file mode 100755 index 000000000..aa3b57c4b --- /dev/null +++ b/40/CH7/EX7.6/Exa_7_6.sce @@ -0,0 +1,24 @@ +//signal reconstruction from samples
+//(a)By step interpolation method
+x=[-1 2 3 2];
+t=2.5;
+ts=1;
+t1=ceil(t);
+t2=floor(t);
+x1t=x(t2)
+//(b)By linear interpolation method
+x2t=(x(t1)+x(t2))/2
+//(c)By sinc interpolation method
+x3t=0;x1=[1 2 3 4];
+for k=1:4
+ x3t=x3t+(x1(k)*sinc(%pi*(t-(k-1))));
+end
+x3t//sinc interpolated value of x(2.5)
+//(d)raised cosine interpolation method
+x4t=0;
+for k=1:4
+ p=(cos(0.5*%pi*(t-k+1))/(1-(t-k+1)^2));
+ xt=x1(k)*sinc(%pi*(t-k+1))*p;
+ x4t=x4t+xt;
+end
+x4t//raised cosine interpolated value of x(2.5)
\ No newline at end of file |