[Nfb-science] Matrix Help for Excel

Christine Szostak szostak.1 at osu.edu
Sat Sep 4 04:13:52 UTC 2010


Hi,
  For the person who had the question regarding how to do the formulas within excel, although this is specific to 03 my guess is that something quite similar should work for 2010 unless MSO has changed significantly:

  For simplification let us say you have a 2X2 matrix as follows:

1 2
3 4

1)  If needing to add each row by the next, place 0s in row 1 otherwise if needing to multiply place 1s in this row (this will become clear later.

e.g. , 0 0 0 ...

2)  For the constant, let us say it is 1 for simplicity, you could write this in a cell separated from the cells of the matrix and the formula described below.
  
e.g., let us say the matrix is in cells A2-B2 and A3-B3. The constant in this case could be placed in c2 (e.g., c2 would contain the number 1 in our example).

3)  Your formula to multiply each row and add the constant plus the result from the row above if entered in D2 would  look something like:

=(a2*b2)+$c$2+$d1

Thus, we multiply quantity of row 1 of our matrix add the constant (1) to this result and then since the first row of the matrix is zero, when we include the final element (D1 we are adding 0 or multiplying 1) since there is actually no prior row in the matrix. This simply allows you to perform everything with a single formula rather than having to write out a second formula. Either option would reult in the same outcome.

4)  simply paste the formula into the entire D column for as many rows as you have for your matrix. Thus, in the next row, excel will shift all numbers but the element of the constant down one row.

Note that the column letters will be dependent upon the size of your matrix.

  Once you have completely finished and are satisfied with the outcomes, simply highlight column d and hit copy, paste special, and values. Then you can delete your row of zeros or ones or relabel these as column headers.

Best of luck,
Christine
 M. Szostak
Graduate Student
Language Perception Laboratory
Department of Psychology, Cognitive Area
The Ohio State University
Columbus, Ohio
szostak.1 at osu.edu


More information about the NFB-Science mailing list