I would like to use implied loop for reshape, but got the error message.
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Special Values in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!