Make sure zVals is a row vector. zVals(:)'