I did a lot of 3D vector math for my Master's Thesis.
This is a collection of the functions I used most.
I tried to keep the names as descriptive as possible.
You can download a zip file of the latest release here:
https://github.com/JamesWigglesworth/MATLAB_3D_Vector_Library/releases/
Please let me know if you find any bugs and feel free to add your own functions!
List of Functions:
v_angle()
v_angles_to_DCM()
v_are_equal()
v_closest_points_between_two_lines()
v_dist_point_to_line()
v_dist_point_to_plane()
v_dist_point_to_point()
v_fit_circle_2D()
v_fit_circle_3D()
v_get_DCM_from_pose()
v_get_point_from_pose()
v_magnitude()
v_make_pose()
v_normalize()
v_plane_fit()
v_plane_line_intersection()
v_plot_plane()
v_plot_pose()
v_project_vector_onto_plane()
v_rotate()
v_rotate_DCM()
v_signed_angle()