MATLAB: Plotting a point in 3D 3d plots How i can i plot the New_P in 3D i'm using robotic toolbox peter corke i should use trplot() function but it's not working P = transpose([2,3,4,0]); New_P = trotx(45) * P Best Answer You can draw this point using plot3()P = transpose([2,3,4,0]);New_P = trotx(45) * P;plot3(New_P(1), New_P(2), New_P(3), '+'); Related SolutionsMATLAB: How i can store a results of a loop FOR (are then Matrix’s) in a new Matrix Ee = [-P(1) e0 -P(3) P(2) -P(2) P(3) e0 -P(1) -P(3) -P(2) P(1) e0]; i = 0; % adding counter index for it=2:4:52 i = i + 1;EeNew(1:3,1:4,i) = [-P(it+3) P(it+2) -P(it+5) P(it+4) % storing evaluated matrices along the 3rd dim. -P(it+4) P(it+2) P(it+2) -P(it+3) -P(it+5) -P(it+4) P(it+3) P(it+2)]; end EeNew = EeNew(:,:); % flattening 3rd dimension to make 3x(4*k) final matrix Not sure i completely understood you question but maybe this is what you are looking for ? MATLAB: How to plot matrix inside for loop Like this?A = [0 3/10;3/5 0];u = [0.3 ;0.8]; p = nan(2,51);% Inisital conditionp(:,1) = [0;0];for n=1:50 p(:,n+1) = A*p(:,n) + u;end% Plot the resultfigureplot(0:50,p(1,:))hold onplot(0:50,p(2,:)) Related QuestionIncrease range of the 3d plotI am trying to draw a pyramid.Is there any possible way to shorten this code without using dynamic variablesMake a function recursive (koch snowflake)Plot Single Point on 3D Graph (Error: Not enough input arguments)
Best Answer