Matlab function output changing when connected to conditional block

Hi all,
I am new matlab user and I am experiencing a weird problem that I've never faced when using other programming sofware such us python or labview. Here is the thing, I just wanted to do one determined thing every second being the discrete time 0.1s. For that purpose I just built a matlab function that calculates the remainder between the clock time and 1. If it is zero y=1 and else y=0. This works just fine (see attached 1). The minute I connect the function output to any conditional or comparator block, the output changes (see attached 2). why????
Thanks!!

Answers (0)

Community Treasure Hunt

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

Start Hunting!