MATLAB: Increase range of the 3d plot

3d plotsmatricesplot

i'm trying to draw 2 matrices using trplot()
but it shows only on matrix as the range of the 3d plot is suited for the range of the first matrix
A = eye(4);
U = [ 0.866 -0.5 0 11 ; 0.5 0.866 0 -1 ; 0 0 1 9 ; 0 0 0 1];
trplot(U,'color','r')
hold on
trplot(A,'color','g')

Best Answer

You need to use view(3)
A = eye(4);
U = [ 0.866 -0.5 0 11 ; 0.5 0.866 0 -1 ; 0 0 1 9 ; 0 0 0 1];
ax = axes();
view(3);
hold on
trplot(U,'color','r')
trplot(A,'color','g')
% daspect([1 1 1]); % optional
Related Question