Round a signal in simulink?

4 Ansichten (letzte 30 Tage)
John Doe
John Doe am 20 Okt. 2020
Beantwortet: Fangjun Jiang am 20 Okt. 2020
Can I round a signal in simulink to the third decimal place?
The round fuction block rounds to the nearest integer, and when I try and use round(var) in a user defined matlab function it works, but round(var,3) errors out.
I feel like this should have a very easy solution, which is currently evading me.
  2 Kommentare
Mathieu NOE
Mathieu NOE am 20 Okt. 2020
hi
this is a dirty trick but it works
first multiply by 1000, round , then multiply by 1e-3
John Doe
John Doe am 20 Okt. 2020
Thanks!

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Fangjun Jiang
Fangjun Jiang am 20 Okt. 2020
'simulink/Discontinuities/Quantizer'

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by