adding matrices for simulation