문제

I want to create an array (or a vector) of Quaternions in MATLAB.

I am doing an interpolation and I want to store the values of the interpolated quaternions in an array.

The problem is how can I define this array so that every result of my for loop will be stored in an data structure of quaternion?

I use the robotics toolbox for the Quaternions.

도움이 되었습니까?

해결책

In Matlab a quaternion is a 1x4 vector, thus an array of quaternions is a nx4 matrix.

%create:
x=zeros(n,4);
%access:
x(2,:)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top