While using default medain function in simulink for calculating median i am facing overflow design error . Why is it so ?

2 visualizzazioni (ultimi 30 giorni)
I have used a matlab function block in simulink for calculating median. It is simple function defined as below
function y = medianC(u)
y = median(u);
Now using sldv I am trying to find design errors then i am facing overflow error. Why is it so ?

Risposte (1)

Akshat Dalal
Akshat Dalal il 21 Mar 2025
Hi Poorna,
I believe since SLDV is a static analysis tool, it does not analyse the possible value of the input 'u' unless you explicitly specify it. Thus, it considers that the median can potentially large values which will cause overflow. If that's not the case, you need to explicity specify the bounds for your inputs after which the overflow design error should get removed.
Thanks,
Akshat.

Categorie

Scopri di più su Modeling in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by