summaryrefslogtreecommitdiff
path: root/macros/bilinear.sci
diff options
context:
space:
mode:
authorAbhinav Dronamraju2017-11-29 17:34:00 +0530
committerAbhinav Dronamraju2017-11-29 17:34:00 +0530
commitd97df53d72f66db206da540e909679fa863b51b6 (patch)
treed771887f58498d5b6fc4c6d1efe0db0376e7a043 /macros/bilinear.sci
parent9539b5efb5ccf665a1cc4b8e814e96460b22e0ab (diff)
downloadFOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.tar.gz
FOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.tar.bz2
FOSSEE-Signal-Processing-Toolbox-d97df53d72f66db206da540e909679fa863b51b6.zip
Added xml files and new functions
Diffstat (limited to 'macros/bilinear.sci')
-rw-r--r--macros/bilinear.sci13
1 files changed, 13 insertions, 0 deletions
diff --git a/macros/bilinear.sci b/macros/bilinear.sci
index d58dd2a..387b8d0 100644
--- a/macros/bilinear.sci
+++ b/macros/bilinear.sci
@@ -1,4 +1,17 @@
function [Zb, Za, Zg]= bilinear(Sb,varargin)
+// Transform a s-plane filter specification into a z-plane specification
+//Calling Sequence
+// [ZB, ZA] = bilinear (SB, SA, T)
+// [ZB, ZA] = bilinear (SZ, SP, SG, T)
+// [ZZ, ZP, ZG] = bilinear (...)
+//Description
+//Transform a s-plane filter specification into a z-plane specification. Filters can be specified in either zero-pole-gain or transfer function form. The input form does not have to match the output form. 1/T is the sampling frequency represented in the z plane.
+//
+//Note: this differs from the bilinear function in the signal processing toolbox, which uses 1/T rather than T.
+//
+//Theory: Given a piecewise flat filter design, you can transform it from the s-plane to the z-plane while maintaining the band edges by means of the bilinear transform. This maps the left hand side of the s-plane into the interior of the unit circle. The mapping is highly non-linear, so you must design your filter with band edges in the s-plane positioned at 2/T tan(w*T/2) so that they will be positioned at w after the bilinear transform is complete.
+//Examples
+//[ZB,ZA]=bilinear([1],[2,3],3)
funcprot(0);
lhs= argn(1);
rhs= argn(2);