<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Nesplňuje to přesně zadání, ale na ošetření výstupu "aby dobře vypadal" se dá použít jednoduchá dolní propust ve stylu</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
zobrazovaná_hodnota := 0.9 * <span style="display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">zobrazovaná_hodnota + 0.1 * hodnota_ze_vstupu</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">Ale přeci jenom je to filtr, takže způsobuje zpoždění signálu.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<span style="display: inline !important; background-color: rgb(255, 255, 255);" class="ContentPasted0">Aleš Procháska</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<b style="font-size: 11pt; font-family: Calibri, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;"><br>
</b></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<b style="font-size: 11pt; font-family: Calibri, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;"><br>
</b></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<b style="font-size: 11pt; font-family: Calibri, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;">Od:</b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);"> Hw-list <hw-list-bounces@list.hw.cz>
za uživatele Martin Záruba <swz@volny.cz></span></div>
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt; color: rgb(0, 0, 0);"><b>Odesláno:</b> neděle 30. července 2023 19:16<br>
<b>Komu:</b> Martin Zaruba <hw-list@list.hw.cz><br>
<b>Předmět:</b> Vzorec s hysterezí</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Mám proměnnou float A, která je výsledkem měření v reálném čase. Z ní mě
<br>
zajímá jen celočíselná část. Samozřejmě není problém desetiny useknout <br>
třeba prostým přiřazením int I = A. Jenže pokud se hodnota A pohybuje <br>
těsně okolo celého čísla, v důsledku fluktuace skáče I nahoru a dolu o <br>
1. A já bych potřeboval, aby když už přeskočí o 1 nahoru, musela se <br>
proměnná A snížit nejmeně o 1, aby I skočila o 1 dolů. Napadá vás, jak <br>
napsat vzorec, který by se takto choval?<br>
<br>
-- <br>
<br>
Martin Záruba<br>
<br>
_______________________________________________<br>
HW-list mailing list - sponsored by www.HW.cz<br>
Hw-list@list.hw.cz<br>
<a href="http://list.hw.cz/mailman/listinfo/hw-list" data-auth="NotApplicable">http://list.hw.cz/mailman/listinfo/hw-list</a><br>
</div>
</span></font></div>
</body>
</html>