summaryrefslogtreecommitdiff
path: root/macros/stft.sci
diff options
context:
space:
mode:
authorbgtushar2017-11-23 19:30:44 +0530
committerbgtushar2017-11-23 19:30:44 +0530
commite9ab4b0b52db51be30f4ac3d07673c20b48da13c (patch)
tree8f4ce37de0a028350125acfce71cfe686e79ef24 /macros/stft.sci
parent14ccddd315f0b97a78e965df1587835ac542e35a (diff)
parentf66d58166a67d6bc89b2a674119410ddaee53d46 (diff)
downloadFOSSEE-Signal-Processing-Toolbox-e9ab4b0b52db51be30f4ac3d07673c20b48da13c.tar.gz
FOSSEE-Signal-Processing-Toolbox-e9ab4b0b52db51be30f4ac3d07673c20b48da13c.tar.bz2
FOSSEE-Signal-Processing-Toolbox-e9ab4b0b52db51be30f4ac3d07673c20b48da13c.zip
Merge
Diffstat (limited to 'macros/stft.sci')
-rw-r--r--macros/stft.sci54
1 files changed, 54 insertions, 0 deletions
diff --git a/macros/stft.sci b/macros/stft.sci
new file mode 100644
index 0000000..01d8f9b
--- /dev/null
+++ b/macros/stft.sci
@@ -0,0 +1,54 @@
+function [y,c]= stft(x, varargin)
+
+funcprot(0);
+lhs= argn(1);
+rhs= argn(2);
+
+if(rhs <1 | rhs>5)
+ error("Wrong number of input arguments");
+end
+
+if(lhs<1 | lhs>2)
+ error("Wrong number of output arguments");
+end
+
+select(rhs)
+ case 1 then
+ select(lhs)
+ case 1 then
+ y= callOctave("stft", x);
+ case 2 then
+ [y,c]= callOctave("stft", x);
+ end
+ case 2 then
+ select(lhs)
+ case 1 then
+ y= callOctave("stft", x,varargin(1));
+ case 2 then
+ [y,c]= callOctave("stft", x, varargin(1));
+ end
+ case 3 then
+ select(lhs)
+ case 1 then
+ y= callOctave("stft", x,varargin(1), varargin(2));
+ case 2 then
+ [y,c]= callOctave("stft", x,varargin(1), varargin(2));
+ end
+ case 4 then
+ select(lhs)
+ case 1 then
+ y= callOctave("stft", x,varargin(1), varargin(2), varargin(3));
+ case 2 then
+ [y,c]= callOctave("stft", x,varargin(1), varargin(2), varargin(3));
+ end
+ case 5 then
+ select(lhs)
+ case 1 then
+ y= callOctave("stft", x,varargin(1), varargin(2), varargin(3), varargin(4));
+ case 2 then
+ [y,c]= callOctave("stft", x,varargin(1), varargin(2), varargin(3), varargin(4));
+ end
+end
+endfunction
+
+