Forum Discussion
Altera_Forum
Honored Contributor
10 years agoOK i see what is going on. When you do discrete functions you need to set up the proper fixed time step. If the time step is too large, you will not get the right results. I set the time step to less than 0.001 (i like 0.0001 better, the is 10kHz) and my discrete results match the continuous results. Fixed time step is set in Simulation > Configuration Parameters.
I am attaching my discrete model. You are using Matlab 6.5 correct? I am attaching a 2009a version and a 6.5 version. I use 2013b so i have to back convert. Hopefully one of these files works for you.