I have a signal builder block with the following signal:
I connect my signal builder block to a "To Workspace" block.
I am using a fixed step solver with sample time of 0.05s. Hence, the output variable "simout" should contain the values of the signal at every Peak and Trough, that is, it should only contain 0's and 1's.
However, at certain time steps my output contains 0.999999999999999 instead of 1 and 1e-5 instead of 0.
Why is the output from my Signal Builder block not precise?
Best Answer