nass-simscape/kinematics/matlab-old/error_NASS.m

51 lines
1.1 KiB
Matlab

%% Plot all 6 errors expressed in the NASS base
figure;
%% Tx
subplot(2, 3, 1);
hold on;
plot(error_nass.Time, error_nass.Data(:, 1), 'k-', 'DisplayName', '$\epsilon_x$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Position (m)');
%% Ty
subplot(2, 3, 2);
hold on;
plot(error_nass.Time, error_nass.Data(:, 2), 'k-', 'DisplayName', '$\epsilon_y$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Position (m)');
%% Tz
subplot(2, 3, 3);
hold on;
plot(error_nass.Time, error_nass.Data(:, 3), 'k-', 'DisplayName', '$\epsilon_z$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Position (m)');
%% Rx
subplot(2, 3, 4);
hold on;
plot(error_nass.Time, error_nass.Data(:, 4), 'k-', 'DisplayName', '$\epsilon_{\theta_x}$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Rotation (rad)');
%% Ry
subplot(2, 3, 5);
hold on;
plot(error_nass.Time, error_nass.Data(:, 5), 'k-', 'DisplayName', '$\epsilon_{\theta_y}$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Rotation (rad)');
%% Rz
subplot(2, 3, 6);
hold on;
plot(error_nass.Time, error_nass.Data(:, 6), 'k-', 'DisplayName', '$\epsilon_{\theta_z}$');
legend();
hold off;
xlabel('Time (s)'); ylabel('Rotation (rad)');