Warning, /utils/matlab/cs_grid/permutetiles.m is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
8df1c1847b Alis*0001 function [a]=permutetiles(b,n)
0002 % a=permutetiles(b) shifts the tile data left by n places around the equator
0003 %
0004 % ie. n=1, tile 2->1, 4->2, 5->4, 1->5, the tiles 3 and 6 get rotated 90 degs.
f8d374081f Jean*0005 %
0006 % Written by adcroft@.mit.edu, 2001.
8df1c1847b Alis*0007 c=b;
0008 for k=1:n
0009
0010 a(:,:,1)=c(:,:,2);
0011 a(:,:,2)=c(end:-1:1,:,4)';
0012 a(:,:,3)=c(end:-1:1,:,3)';
0013 a(:,:,4)=c(:,:,5);
0014 a(:,:,5)=c(:,end:-1:1,1)';
0015 a(:,:,6)=c(:,end:-1:1,6)';
0016
0017 c=a;
0018 end
0019 a=c;