Reputation: 63
I have file with a lot of data, for example here is a file with this data ->
time: 1 2 3 4 5 6 7 8 9 10
data: 1 0 1 1 1 1 1 0 1 0
but in my file I have dropped the multiple data going in sequence like this ->
time: 1 2 3 8 9 10
data: 1 0 1 0 1 0
If I run this data the result is this ->
My question is how to achieve result like in this picture shown with red arrows. Simplier, how to repeat the value in not defined time steps (4,5,6,7 example above)
Upvotes: 1
Views: 618
Reputation: 1
Try: Double-click the "From File" block, then go to the option "Data extrapolation within time range:", and select "Zero order hold"
Upvotes: 0
Reputation: 1390
you can achive this by not droping the final (7 in this example) like this:
time: 1 2 3 7 8 9 10
data: 1 0 1 1 0 1 0
this way simulink will interpolate ones there.
Upvotes: 3