My code

Modified the Makevector and mean functions.