Skip to content

Commit 6ca770f

Browse files
committed
Performance fixes as per issue #12
1 parent 06d7d58 commit 6ca770f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trnorm.m

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@
5252

5353
if ndims(T) == 3
5454
% recurse for transform sequence
55-
nd = size(T, 3);
56-
r = zeros(4,4,nd);
57-
for i=1:nd
55+
n = size(T);
56+
TR = zeros(n);
57+
for i=1:n(3)
5858
TR(:,:,i) = trnorm(T(:,:,i));
5959
end
6060
return
6161
end
6262

63-
n = T(1:3,1); o = T(1:3,2); a = T(1:3,3);
63+
o = T(1:3,2); a = T(1:3,3);
6464
n = cross(o, a); % N = O x A
6565
o = cross(a, n); % O = A x N
6666
R = [unit(n) unit(o) unit(a)];

0 commit comments

Comments
 (0)