# Check for time invariance of a _system_ using MATLAB?

I am having difficulty in developing an algorithm for checking if a given system is time invariant or not.

For example, let there be 2 systems with input output relation given as:

$$y(t)=x(t-2)$$ or $$y(t)=tx(t-1)$$

Now the first system is time invariant whereas the second one is not. But how do I write a function in MATLAB that would take the input output relationship and find out if the system is time invariant or not.

• could u help in taking the input -output relation of a system from the user. for ex. how would i take the following as input from the user $y(t)=t.x(t-1)$ – suhail Sep 15 '14 at 14:06