How can i use If block for a matrix in SIMULINK?

2 次查看(过去 30 天)
My block-set should use if block and convert any value of the given matrix from current value to 5 if a value greater than 0.
How can i do this operation?
Thx!!
I have just added the model and image.
untitled.png

采纳的回答

madhan ravi
madhan ravi 2019-3-18
Ok lets use some vectorised method (logical indexing):
Screen Shot 2019-03-18 at 5.45.52 PM.png
  6 个评论
Alex Yande
Alex Yande 2019-3-19
Thank you madhan ravi.
Yesterday, after your message, i completed the codes which are similar to yours. Thanks a lot! :)

请先登录,再进行评论。

更多回答(0 个)

类别

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