added initial code

Changed names of variables from vector example and replaced mean
library function with solve library function