I understand you want to create a clock generator that generates a periodic signal representing the hours of the day from 0 to 23, you can use the following steps:
- Use a 'Ramp block' in Simulink to generate a ramp signal with a period of 23 hours. This will represent the continuous progression of time within a day.
- You can use a 'Modulo block' to take the modulus of the ramp signal, effectively wrapping the signal back to 0 after it reaches 23. This will ensure that the signal remains within the desired range of 0 to 23.
- To quantize the Signal, use a 'Quantizer block' to quantize the modulated ramp signal to integers. This will convert the continuous time representation into discrete hours of the day, ranging from 0 to 23.
- Use a 'Delay block' with a delay time of 23 hours to delay the quantized signal by one day. This will effectively create a repeated sequence of the hourly values, allowing the simulation to run for two days.
For further information, refer to the documentation links below: