From c0c0582462720ed597b00e116506570577614e89 Mon Sep 17 00:00:00 2001 From: shamikam Date: Tue, 7 Nov 2017 15:59:48 +0530 Subject: initial commit --- macros/specgram.sci | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 macros/specgram.sci (limited to 'macros/specgram.sci') diff --git a/macros/specgram.sci b/macros/specgram.sci new file mode 100644 index 0000000..3af24f1 --- /dev/null +++ b/macros/specgram.sci @@ -0,0 +1,21 @@ +function [S_r, f_r, t_r] = specgram(x,n,fs,window,overlap) + +funcprot(0); +rhs = argn(2) + +if(rhs<1 | rhs>5) +error("Wrong number of input arguments.") +end + select(rhs) + case 1 then + [S_r, f_r, t_r] = callOctave("specgram",x) + case 2 then + [S_r, f_r, t_r] = callOctave("specgram",x,n) + case 3 then + [S_r, f_r, t_r] = callOctave("specgram",x,n,fs) + case 4 then + [S_r, f_r, t_r] = callOctave("specgram",x,n,fs,window) + case 5 then + [S_r, f_r, t_r] = callOctave("specgram",x,n,fs,window,overlap) + end +endfunction -- cgit