The transportation problems have attracted many researchers in optimization because of their applications in several areas of science and real life. Therefore, solving of these problems especially finding initial basic feasible solution for them would be significant. Although there are some heuristic approaches to find initial solution, but there is no any efficient algorithm with its Matlab code to solve random large size transportation problems. In this paper, an efficient algorithm in three cases with its Matlab code is proposed which even is better than the best algorithm in references by solving some test problems and also our generated large size problems. The algorithm is forcefully efficient for problems with large size and it has sufficiently suitable results, at least in on case of the algorithm, for test problems in the references according to computational results.