Using Average Function In Matlab