There should be better alternatives to fix that issue, but the only one I see based on my previous experiments, could be by replacing all the stuffs before S/H blocks by an 1-D vector, in you case with the length of 4096 values. Don't know exactly what function could do that, but discretizer is the first one which come to mind.
Yes, it would be a solution ... i.e. transform the train of continuous values into 1-D vector in order to apply it to FFT, but unfortunately I didn't find any Simulink block capable to do it.
I turned my attention to
"Zero-Order Hold" from Simulink
"Discrete" library and also modified sinusoidal waveform output type from
Discrete to
Continuous.
This way
"Zero-Order Hold" can be considered as "sampler".
Indeed it is the case - after
"Zero-Order Hold" I can place
"Buffer" and simulation runs, i.e.
no error is generated.
Then I returned to my original task - simulate
"Sample-and-Hold" behavior and its impact on incoming signal.
According to textbook (please see screenshot below), the
"Sample-and-Hold" acts as filter having a characteristic
sinc(x).
So if I apply, let say, 3 sinusoidal waveforms to such
"Sample-and-Hold", it should filter out frequencies that close to
Nyquist frequency.
But in my setup it doesn't ... all 3 sinusoidal waveforms manifest the same levels at the output of
"Sample-and-Hold".
In correct simulation output of
Sin_f3 < output of Sin_f2 < output of Sin_f1.
So, the conclusion is:
"Zero-Order Hold" cant transform continuous signal into discrete , but can't "emulate" real "Sample-and-Hold"
So, the problem apparently quite simple ... persists.