DMD
DMD

Reputation: 43

How to make the output type of the comparison block 'double' in Simulink?

I want to compare a number to another: if the comparison is true the current value must pass but if not it must stop. But I can't do this idea because the output of the compare block is boolean so if it is true, the output is 1 so the current value will not pass as same number. How can I do this idea? Thanks.

enter image description here

Upvotes: 1

Views: 5367

Answers (1)

horchler
horchler

Reputation: 18484

One way to accomplish this would be to use a Switch block (under Commonly Used Blocks and Signal Routing) instead of the Relational Operator block.

There is also a Data Type Conversion block if you ever do need to convert a Boolean output to double precision, but I don't think that's what you want in this case.

Upvotes: 4

Related Questions