What is the typical way of doing the following starting with a 0 matrix, set all values to 1 when a certain condition is met, set to -1 when another condition is met, left alone if neither condition is met. Mathew