I have been provided with a rotation matrix to use:
and have entered the matrix into my function as
theta = radians(theta);
Ry(theta) = [cos(theta) 0 sin(theta); 0 1 0; -sin(theta) 0 cos(theta)];
newpose = pos*Ry(theta);
yet whenever the function reaches this stage it returns the error
??? Subscript indices must either be real positive integers or logicals.
any help much appreciated