MATLAB: How to rotate, scale and transform x y z coordination. project I want to do coding for following equations. How i do it using mat lab. Please help me. Best Answer clc; clear all ;% square coordinates Sx = [0 1 1 0 0] ;Sy = [0 0 1 1 0] ;S = [Sx' Sy'] ;% Rotation th = linspace(0,2*pi) ;for i = 1:length(th) R = [cos(th(i)) sin(th(i)) ; -sin(th(i)) cos(th(i))] ; Sr = S*R ; plot(S(:,1),S(:,2),'b') hold on plot(Sr(:,1),Sr(:,2),'r') hold off drawnow pause(0.1)end Related SolutionsMATLAB: How to plot a circle with a given radius and center and i need to extract x,y,z points The circle you described is two-dimensional. The ‘z’ coordinate is uniformly 0. If you want a circle above the plane, just define a new variable ‘zunit’ and define a vector to define it. This code puts the circle at z=5:r = 1.25;x = 0.1;y = -0.1;th = 0:pi/50:2*pi;xunit = r * cos(th) + x;yunit = r * sin(th) + y;zunit = 5*ones(size(th));figure(1)plot3(xunit, yunit, zunit)grid onaxis([-1.5 1.5 -1.5 1.5 0 10]) MATLAB: How to use plot Maybe thissyms x th=[0:0.05:1.57]; [x]=solve('cos(th+x)=0','x');f=subs(x,'th',th);plot(th,f,th,cos(th),'r')legend('f','cos(th)') Related QuestionPlot function of 3 variablesSurface plot for multiple vector pointsMultiplication of matrices with Multiple variablesHow to plot life of treeSolver for overdetermined system of non-linear equationsHow to use of trigonometric identities in matlab
Best Answer