Matrix ability added

now arrays can be used for any variable and plot results