How to make matrix have different input fields?