Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

RotatePoint.m 418 B

12345678910111213
  1. % RotatePoint.m
  2. %
  3. % Rotates a point by multiplying from the left with the provided rotation matrix.
  4. function rotVec = RotatePoint(rot, vec)
  5. if (size(vec,2) > size(vec,1))
  6. vec = vec';
  7. end
  8. assert(size(vec,1) == 3 && size(vec,2) == 1, 'Vector should have exactly 3 elements');
  9. assert(size(rot,1) == 3 && size(rot,2) == 3, 'Rotation matrix has incorrect dimensions');
  10. rotVec = rot * vec;
  11. end