Skip to content

Instantly share code, notes, and snippets.

@mathsam
Last active December 19, 2015 10:39
Show Gist options
  • Save mathsam/5941595 to your computer and use it in GitHub Desktop.
Save mathsam/5941595 to your computer and use it in GitHub Desktop.
function field2d = zonalMean2d(field3d)
% input is a filed3d(log,lat,p)
% return average field2d(lat,p)
numLog = size(field3d,1);
field2d = reshape(sum(field3d,1)/numLog,size(field3d,2),size(field3d,3));
return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment