We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34bf91f commit c4690c8Copy full SHA for c4690c8
trlog.m
@@ -55,6 +55,10 @@
55
56
function [o1,o2] = trlog(T)
57
58
+ if isa(T, 'symfun')
59
+ T = formula(T);
60
+ end
61
+
62
if isrot(T)
63
% deal with rotation matrix
64
@@ -65,13 +69,13 @@
65
69
66
70
R = T;
67
71
68
- if abs(trace(R) - 3) < 100*eps
72
+ if ~isa(R, 'sym') && abs(trace(R) - 3) < 100*eps
73
% matrix is identity
74
75
w = [0 0 0]';
76
theta = 0;
77
- elseif abs(trace(R) + 1) < 100*eps
78
+ elseif ~isa(R, 'sym') && abs(trace(R) + 1) < 100*eps
79
% tr R = -1
80
% rotation by +/- pi, +/- 3pi etc
81
@@ -106,7 +110,7 @@
106
110
107
111
[R,t] = tr2rt(T);
108
112
109
113
114
% rotation matrix is identity, theta=0
115
116
v = t;
0 commit comments