Round a signal in simulink?

3 次查看(过去 30 天)
John Doe
John Doe 2020-10-20
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 个评论
Mathieu NOE
Mathieu NOE 2020-10-20
hi
this is a dirty trick but it works
first multiply by 1000, round , then multiply by 1e-3

请先登录,再进行评论。

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2020-10-20
'simulink/Discontinuities/Quantizer'

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by