03-03-2012 03:50 PM
The graph in your screenshot is what is called a piecewise function. Roughly, it would be something like this:
tmod = tsim modulo 6000
if tmod <= 1000
y = tmod * 2 / 1000
if 1000 < tmod <= 2000
y = 0
if 2000 < tmod <= 3000
y = 2
ect...
where tsim is the simulation time and y is your output.
This is admittedly not as ideal as the periodic block you mentioned, but should be easy to implement none the less.
03-07-2016 10:27 AM
I changed your programming, it is working. please see it.
03-07-2016 10:45 AM
You replied to a post which is about 4 years old...