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

2 Ansichten (letzte 30 Tage)
Alex Yande
Alex Yande am 18 Mär. 2019
Kommentiert: madhan ravi am 19 Mär. 2019
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

Akzeptierte Antwort

madhan ravi
madhan ravi am 18 Mär. 2019
Ok lets use some vectorised method (logical indexing):
Screen Shot 2019-03-18 at 5.45.52 PM.png
  6 Kommentare
Alex Yande
Alex Yande am 19 Mär. 2019
Thank you madhan ravi.
Yesterday, after your message, i completed the codes which are similar to yours. Thanks a lot! :)
madhan ravi
madhan ravi am 19 Mär. 2019
No mention, glad ;-).

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by