Function for limit range
Mostra commenti meno recenti
Is there any function in matlab just like 'saturation' block in simulink? Which limit a input value within a range. If it exceeds the upper value it sets to the upper value and same for lower value.
Risposte (2)
dpb
il 26 Mar 2014
Not builtin but it's simple enough to create...
function y = bound(x,bl,bu)
% return bounded value clipped between bl and bu
y=min(max(x,bl),bu);
1 Commento
Fahad Mirza
il 26 Mar 2014
Erik Newton
il 29 Ago 2024
1 voto
Categorie
Scopri di più su Simulink Functions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!