![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177736/image.png)
Logical Matrix Indexing - Simulink
1 次查看(过去 30 天)
显示 更早的评论
I want to set all values bigger than one to 255. Matlab Code would be easily A(A>1) = 255;
But which Simulink blocks can I use to do this? Thank you!
0 个评论
采纳的回答
AbhimanyuSingh
2017-8-8
You Can use the Switch Block present in the /Simulink/Signal Routing/Switch In block properties you can select the 'Threshold' property value as 1 and 'Criteria for passing input' as "u2>Threshold", as shown in the attached image:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177736/image.png)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!