Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5ef64fd8bc
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (56 sloc) 3.4 kb
function [fvalue,A,B,C,E,F,G,H,J,K,L] = rf_pose_from_point_tangents_2_fn_t_for_root(t)
%perturb = -4.9e6;
%perturb = -1.7e8;
%perturb = -2.55e7;
perturb = 0;
% same as rf_pose_from_point_tangents_2_fn_t, but polynomial value might be
% perturbed by max of (perturb) so that roots appear for noisy data. This wasn't
% used in the end.
%
% function of t part:
global A0 A1 A2
global B0 B1 B2 B3
global C0 C1 C2 C3 C4
global E0 E1 E2
global F0 F1 F2 F3
global G0 G1 G2 G3 G4
global H0 H1 H2 H3 H4
global J0 J1 J2 J3
global K0 K1 K2 K3
global L0 L1 L2
A = (A0 + A1*t + A2*t^2 - A1*t^3 + A0*t^4) / (1+t^2)^2;
B = (B0 + B1 *t + B2 *t^2 + B3 *t^3 - B2 *t^4 + B1 *t^5 - B0 *t^6) / (1+t^2)^3;
C = (C0 + C1 *t + C2 *t^2 + C3 *t^3 + C4 *t^4 - C3 *t^5 + C2 *t^6 - C1 *t^7 + C0 *t^8)/(1+t^2)^4;
E = (E0 + E1 *t + E2 *t^2 - E1 *t^3 + E0 *t^4)/(1+t^2)^2;
F = (F0 + F1 *t + F2 *t^2 + F3 *t^3 - F2 *t^4 + F1 *t^5 - F0 *t^6)/(1+t^2)^3;
G = (G0 + G1 *t + G2 *t^2 + G3 *t^3 + G4 *t^4 - G3 *t^5 + G2 *t^6 - G1 *t^7 + G0 *t^8) / (1+t^2)^4;
H = (H0 + H1 *t + H2 *t^2 + H3 *t^3 + H4 *t^4 - H3 *t^5 + H2 *t^6 - H1 *t^7 + H0 *t^8)/(1+t^2)^4;
J = (J0 + J1 *t + J2 *t^2 + J3 *t^3 - J2 *t^4 + J1 *t^5 - J0 *t^6) / (1+t^2)^3 ;
K = (K0 + K1 *t + K2 *t^2 + K3 *t^3 - K2 *t^4 + K1 *t^5 - K0 *t^6) / (1+t^2)^3;
L = (L0 + L1 *t + L2 *t^2 - L1 *t^3 + L0 *t^4) / (1+t^2)^2;
fvalue = E * E * B * B * H * H * J * J + G * G * C * C * pow(L, 0.4e1) + G * G * A ...
* A * pow(K, 0.4e1) + E * E * A * A * pow(H, 0.4e1) + E * E * C * C * pow(J, ...
0.4e1) - 0.2e1 * E * A * H * H * G * C * L * L + 0.2e1 * E * E * A * H * H * C * ...
J * J - 0.2e1 * E * E * C * pow(J, 0.3e1) * B * H + 0.2e1 * E * C * C * J * J * ...
G * L * L + 0.2e1 * E * A * A * H * H * G * K * K - 0.2e1 * E * E * A * pow(H, ...
0.3e1) * B * J - 0.2e1 * E * A * H * H * G * B * K * L - 0.2e1 * E * C * J * J * ...
G * B * K * L - 0.2e1 * E * C * J * J * G * A * K * K - 0.2e1 * E * B * H * J * ...
G * C * L * L - 0.2e1 * E * B * H * J * G * A * K * K + G * G * B * B * K * K * ...
L * L - 0.2e1 * G * G * B * K * pow(L, 0.3e1) * C - 0.2e1 * G * G * B * pow(K, ...
0.3e1) * L * A + 0.2e1 * G * G * C * L * L * A * K * K - 0.2e1 * F * E * A * A * ...
pow(H, 0.3e1) * K - 0.2e1 * F * E * A * H * K * C * J * J + 0.3e1 * F * E * A * ...
H * H * K * B * J + 0.3e1 * F * A * H * K * K * G * B * L - 0.2e1 * F * A * H * ...
K * G * C * L * L - 0.2e1 * F * A * A * H * pow(K, 0.3e1) * G + F * E * B * ...
pow(H, 0.3e1) * L * A + 0.3e1 * F * E * B * H * L * C * J * J - F * E * B * B * ...
H * H * L * J - F * B * B * H * L * L * G * K + F * B * H * pow(L, 0.3e1) * G * ...
C + F * E * B * K * pow(J, 0.3e1) * C - F * E * B * B * K * J * J * H - F * B * ...
B * K * K * J * G * L + 0.3e1 * F * B * K * J * G * C * L * L + F * B * pow(K, ...
0.3e1) * J * G * A - 0.2e1 * F * E * C * J * L * A * H * H - 0.2e1 * F * E * C * ...
C * pow(J, 0.3e1) * L - 0.2e1 * F * C * C * J * pow(L, 0.3e1) * G - 0.2e1 * F * ...
C * J * L * G * A * K * K + F * F * A * A * K * K * H * H + F * F * A * K * K * ...
C * J * J - F * F * A * K * K * B * H * J - F * F * B * K * L * A * H * H - F * ...
F * B * K * L * C * J * J + F * F * B * B * K * L * H * J + F * F * C * L * L * ...
A * H * H + F * F * C * C * L * L * J * J - F * F * C * L * L * B * H * J + G * ...
E * B * B * H * H * L * L + G * E * B * B * K * K * J * J + 0.8e1 * G * E * A * ...
H * K * C * J * L;
fvalue = fvalue + perturb;
Jump to Line
Something went wrong with that request. Please try again.