MATLAB: Simulink buffer: How to fix the error “All sample times must be discrete. No continuous or constant sample times are allowed.”

bufferdiscrete inputsimulink

I have a discrete scalar input into a simulink buffer and would like the buffer to output a 100×1 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.

Best Answer

Try feeding the Buffer block with a Constant block. Changing the sample time of the Constant block from "inf" to 0.1 (for example) will result in the disappearance of this error message. "inf" means constant sample time.