[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] hysterese?



> Der skulle ikke være nogen der kender en algoritme der kan simulere
> hysterese?

STATE=0
VOLT=0

while true ; do
        echo "STATE:$STATE VOLT:$VOLT"
        if [ $STATE -eq 0 ] ; then
                if [ $VOLT -ge 6 ]; then
                        STATE=1
                fi
        else
                if [ $VOLT -le 4 ]; then
                        STATE=0
                fi
        fi
        let VOLT=$VOLT+1
done

Du skal bare huske på hvad din STATE er på den anden side.

Hvis din STATE er 0 og du får en VOLT der er højere end 6, så skifter du
STATE til 1.

Hvis STATE er 1 og den nye VOLT er under 4, så skift til 0.

/hans
-- 
Even if you hate images of text on the web, this tutorial...
              -- http://www.gimp.org/tutorials/



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-08-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *