Dear all, I would like to reduce computational time, so tried to use implied loop as following:
BD0 = [330 350];P_interp = interpn(x,y,reshape(squeeze(isen(1:xn,1:yn,:,1:tn)),1,zn),t,reshape(squeeze(isob(1:xn,1:yn,:,1:zn)),1,zn),x,y,BD0',t);
The x and y consist of longitudes and latitudes respectively, and t the time steps. I want to interpolate two more isob values with respect to isen every third dimension according to BD0, but got the error message: Error using reshape To RESHAPE the number of elements must not change. What should I do? Any help would be appreciated.
Sincerely, Charles Tai
Best Answer