Question: how does lsim work matlab?
Answer: lsim simulates the (time) response of continuous or discrete linear systems to arbitrary inputs. When invoked without left-hand arguments, lsim plots the response on the screen. The input u is an array having as many rows as time samples ( length(t) ) and as many columns as system inputs.