comparison scripts/general/rotdim.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 16f53d29049f
children 6622772a0add
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
72 plane = []; 72 plane = [];
73 dim = 0; 73 dim = 0;
74 while (dim < nd) 74 while (dim < nd)
75 dim = dim + 1; 75 dim = dim + 1;
76 if (sz (dim) != 1) 76 if (sz (dim) != 1)
77 plane = [plane, dim]; 77 plane = [plane, dim];
78 if (length (plane) == 2) 78 if (length (plane) == 2)
79 break; 79 break;
80 endif 80 endif
81 endif 81 endif
82 endwhile 82 endwhile
83 if (length (plane) < 1) 83 if (length (plane) < 1)
84 plane = [1, 2]; 84 plane = [1, 2];
85 elseif (length (plane) < 2) 85 elseif (length (plane) < 2)
86 plane = [1, plane]; 86 plane = [1, plane];
87 endif 87 endif
88 else 88 else
89 if (! (isvector (plane) && length (plane) == 2 89 if (! (isvector (plane) && length (plane) == 2
90 && all (plane == round (plane)) && all (plane > 0) 90 && all (plane == round (plane)) && all (plane > 0)
91 && all (plane < (nd + 1)) && plane(1) != plane(2))) 91 && all (plane < (nd + 1)) && plane(1) != plane(2)))
92 error ("rotdim: plane must be a 2 element integer vector defining a valid plane"); 92 error ("rotdim: plane must be a 2 element integer vector defining a valid plane");
93 endif 93 endif
94 endif 94 endif
95 95
96 k = rem (k, 4); 96 k = rem (k, 4);