MATLAB: How to translate a point according to a direction theta translation How to translate a point by a distance "d" according to a direction theta ? Best Answer translatedPoint = d*[cos(theta); sin(theta)]+[x;y]; Related SolutionsMATLAB: How to define a function that evaluates in input function y=T(theta_Degree)theta=theta_Degree*pi/180;y=[cos(theta)^2 sin(theta)^2 2*cos(theta)*sin(theta);sin(theta)^2 cos(theta)^2 -2*cos(theta)*sin(theta);-cos(theta)*sin(theta) cos(theta)*sin(theta) cos(theta)^2-sin(theta)^2];endThen type in command lineT(40)and see the results. MATLAB: 3D plot an ellipsoid How about using a fsurf function, like:a = 2;b = 1;funx = @(theta,phi) a*cos(theta).*cos(phi);funy = @(theta,phi) b*cos(theta).*sin(phi);funz = @(theta,phi) b*sin(theta);fsurf(funx,funy,funz,[-pi/2 pi/2 -pi pi]) Related QuestionHow to translate a body in +Y directionSolving for rotation matrix: Align vector a with vector b, then rotate around vector bImregister translation mode, suppress registration in second direction
Best Answer