summaryrefslogtreecommitdiff
path: root/macros/diric.sci
diff options
context:
space:
mode:
authorshamikam2017-11-07 15:59:48 +0530
committershamikam2017-11-07 15:59:48 +0530
commitc0c0582462720ed597b00e116506570577614e89 (patch)
tree31dedd23698e5357b19c810b7d7a8464100ef44a /macros/diric.sci
downloadFOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.gz
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.tar.bz2
FOSSEE-Signal-Processing-Toolbox-c0c0582462720ed597b00e116506570577614e89.zip
initial commit
Diffstat (limited to 'macros/diric.sci')
-rw-r--r--macros/diric.sci24
1 files changed, 24 insertions, 0 deletions
diff --git a/macros/diric.sci b/macros/diric.sci
new file mode 100644
index 0000000..077bb13
--- /dev/null
+++ b/macros/diric.sci
@@ -0,0 +1,24 @@
+function [y]= diric(x,n)
+
+// Calculates the dirichlet function
+// Calling Sequence
+// [y]=diric(x,n)
+// Parameters
+// x: Real valued vector or matrix
+// n: Real positive integer or complex integer
+// Description
+// This is an Octave function
+// y=diric(x,n) returns the dirichlet function values of parameter x.
+// Examples
+// 1. diric([1 2 3],3)
+// ans= 0.6935349 0.0559021 -0.3266617
+// 2. diric(1,2)
+// ans= 0.8775826
+
+funcprot(0);
+rhs=argn(2);
+if (rhs~=2) then
+ error ("Wrong number of input arguments.")
+else y= callOctave("diric",x,n)
+end
+endfunction