Simulink buffer: How do I fix the error "All sample times must be discrete. No continuous or constant sample times are allowed."
Show older comments
I have a discrete scalar input into a simulink buffer and would like the buffer to output a 100x1 vector of the scalar inputs. However, I keep getting this error and I can't figure out why, because the input into the buffer is discrete.
Accepted Answer
More Answers (2)
Ahmed Alfadhel
on 14 Nov 2018
Edited: Ahmed Alfadhel
on 14 Nov 2018
0 votes
Hello ,
This error is persistent even when I changed the smple time to 0.1 of the input port.
Guys your help plz.


Arif Hussain
on 29 Jul 2021
0 votes
I changed sample time of block from 0 to 0.001 and it works perfectly.
2 Comments
Unza Muhammad
on 8 Dec 2022
brother which block?
Matthew Schweiss
on 28 Mar 2026 at 3:56
I just encountered this issue myself.
The problem is there is some block that leads into the buffer block that has the "sample time" set to 0.
That is what causes the error.
That may be the "From Workspace", "Sine Wave" block, or something similar.
Categories
Find more on Buffers, Switches, and Counters in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
