thanks for your reply, i know how to derive the transfer function, but that function can only be derived based on a linear model of the quantizer, here we are going to investigate the real performance rather than linear model, i do have the code to describe the quantizer, but the thing i actually need is how to describe the connection between different blocks in the figure, this could of course be easily done in simulink, but i am just asked to code that in matlab. To me, this is actually a programming problm with matlab