blob: 90286e2744c59d07e764cfdcca36937a4050e885 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
function v = schtrig (x, lev, rs)
//This function implements a multisignal Schmitt triggers with lev levels supplied as input.
//Calling Sequence
//v = schtrig (x, lev)
//v = schtrig (x, lev, rs)
//Parameters
//x: vector or matrix of real numbers
//lev: real number
//rs: default value 1
//Description
//This is an Octave function.
//This function implements a multisignal Schmitt triggers with lev levels supplied as input.
//The argument 1 is a matrix (or a vector) and this trigger works along its first dimension.
//Examples
//schtrig([0.2,-3,5],-4)
//ans =
// 0. 0. 1.
funcprot(0);
rhs = argn(2)
if(rhs<2 | rhs>3)
error("Wrong number of input arguments.")
end
if(rhs==2)
v = callOctave("schtrig", x, lev)
elseif(rhs==3)
v = callOctave("schtrig",x, lev, rs)
end
endfunction
|