How does this differ from https://www.mathworks.com/matlabcentral/answers/1662610-i-am-trying-to-generate-these-3-plots?s_tid=srchtitle ?
Where are you taking into account the analysis I posted in https://www.mathworks.com/matlabcentral/answers/1662610-i-am-trying-to-generate-these-3-plots#answer_909164 in which I showed that your code is creating strictly linear responses?