1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
3
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
4
original version by: Nikos Drakos, CBLU, University of Leeds
5
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
6
* with significant contributions from:
7
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
10
<TITLE>Threshold detection at zero </TITLE>
11
<META NAME="description" CONTENT="Threshold detection at zero ">
12
<META NAME="keywords" CONTENT="main">
13
<META NAME="resource-type" CONTENT="document">
14
<META NAME="distribution" CONTENT="global">
16
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
17
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
19
<LINK REL="STYLESHEET" HREF="main.css">
23
<BODY bgcolor="#FFFFFF">
25
<!--Table of Child-Links-->
26
<A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A>
29
<LI><A NAME="tex2html4456"
30
HREF="ZCROSS_f.htm#SECTION00563100000000000000">Library</A>
31
<LI><A NAME="tex2html4457"
32
HREF="ZCROSS_f.htm#SECTION00563200000000000000">Description</A>
33
<LI><A NAME="tex2html4458"
34
HREF="ZCROSS_f.htm#SECTION00563300000000000000">Dialog Box</A>
35
<LI><A NAME="tex2html4459"
36
HREF="ZCROSS_f.htm#SECTION00563400000000000000">Default properties</A>
37
<LI><A NAME="tex2html4460"
38
HREF="ZCROSS_f.htm#SECTION00563500000000000000">Interfacing function</A>
39
<LI><A NAME="tex2html4461"
40
HREF="ZCROSS_f.htm#SECTION00563600000000000000">Computational function (type 1)</A>
42
<!--End of Table of Child-Links-->
45
<H2><A NAME="SECTION00563000000000000000"></A><A NAME="ZCROSS_f"></A>
47
Threshold detection at zero
51
$\epsfig{file=ZCROSS_f.eps,width=90.00pt}$
54
WIDTH="143" HEIGHT="161" ALIGN="BOTTOM" BORDER="0"
56
ALT="\epsfig{file=ZCROSS_f.eps,width=90.00pt}">
58
<H3><font color="blue"><A NAME="SECTION00563100000000000000">
63
<H3><font color="blue"><A NAME="SECTION00563200000000000000">
66
An output event is generated when all inputs (if more than one) cross
69
<H3><font color="blue"><A NAME="SECTION00563300000000000000">
73
<TABLE CELLPADDING=3 BORDER="1">
74
<TR><TD ALIGN="CENTER">Set Zero-Crossing parameters</TD>
77
<TR><TD ALIGN="CENTER">Input size</TD>
78
<TD ALIGN="CENTER">1</TD>
84
<LI>Input size: a positive integer.
88
<H3><font color="blue"><A NAME="SECTION00563400000000000000">
89
Default properties</A>
95
<LI>direct-feedthrough: yes
97
<LI>zero-crossing: yes
101
<LI>number/sizes of inputs: 1 / 1
103
<LI>number/sizes of outputs: 0 /
105
<LI>number/sizes of activation inputs: 0 /
107
<LI>number/sizes of activation outputs: 1 / 1
109
<LI>continuous-time state: no
111
<LI>discrete-time state: no
113
<LI>name of computational function: <EM>zcross</EM>
116
<H3><font color="blue"><A NAME="SECTION00563500000000000000">
117
Interfacing function</A>
119
<TT>scilab/macros/scicos_blocks/threshold/ZCROSS_f.sci</TT>
121
<H3><font color="blue"><A NAME="SECTION00563600000000000000">
122
Computational function (type 1)</A>
125
<PRE> subroutine zcross(flag,nevprt,t,xd,x,nx,z,nz,tvec,ntvec,
126
& rpar,nrpar,ipar,nipar,u,nu,g,ng)
129
c Scicos block simulator
130
c zero crossing block
132
double precision t,xd(*),x(*),z(*),tvec(*),rpar(*),u(*),g(*)
133
integer flag,nevprt,nx,nz,ntvec,nrpar,ipar(*)
137
if ((flag.eq.3).and.(nevprt.lt.0)) then
140
kev=2*kev+abs(g(ng+1-j))
144
if (g(ng+1-j).eq.-1) kev=kev+1
151
elseif(flag.eq.9) then