The harmonic synthesis and analysis of the elements of gravitational tensor can be done in few minutes if a suitable programming algorithm is used. Vectorization is an efficient technique for such processes, but the size of matrices will increase when the resolution of synthesis or analysis is high; say higher than 0.5°×0.5°. Here, we present a technique to manage the computer memory and computational time by excluding one computational loop from the matrix products and we call this method semivectorization. Based on this technique, we synthesize the gravitational tensor using the EGM96 geopotential model and after that we analyze the tensor for recovering the geopotential coefficients. MATLAB codes are provided which are able to analyze 224 millions gradiometric data, corresponding to a global grid of 2.5′×2.5′ on a sphere in 1,093 s by a personal computer with 2 Gb RAM.