Skip to content

Commit

Permalink
update acos issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtuck committed Jan 29, 2021
1 parent 3d69d38 commit 7ef4b36
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion Find_Rotation_and_Seed_unique.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,13 @@
else
q2new = q2n;
end
Ec = acos(InnerProd_Q(q1,q2new));

tmp = InnerProd_Q(q1,q2new);
if tmp > 1
tmp = 1;
end

Ec = acos(tmp);
if Ec < minE
Rbest = R;
q2best = q2new;
Expand Down
10 changes: 5 additions & 5 deletions fdacurve.m
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
cent % center
scale % scale
E % energy
len % scale of curve
len_q % scale of SRVF
mean_scale % mean scale
mean_scale_q % mean scale
len % length of curves
len_q % length of SRVFs
mean_scale % mean length
mean_scale_q % mean length SRVF
end

methods
Expand Down Expand Up @@ -610,7 +610,7 @@ function plot_pca(obj, n)

p = q_to_curve(q2n,tmp_scale);
if obj.scale
mv = 0.2*mean(obj.len);
mv = 0.2*obj.mean_scale;
else
mv = 0.2;
end
Expand Down

0 comments on commit 7ef4b36

Please sign in to comment.