Viewpoint you can set the angle of view of a 3 d plot

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: e command: view(az,el) az is the azimuth and el is the elevation of the viewpoint, both in degrees. See the viewpoint gure for an illustration of azimuth and elevation relative to the Cartesian coordiate system. Z Viewpoint Y Elevation =30 0 X Azimuth =-37.5 Default Viewpoint Example 5: View the internal Matlab peaks matrix from 4 di erent viewpoints. The rst one, (view(-37.5,30), is the default viewpoint. subplot(2,2,1) subplot(2,2,2) subplot(2,2,3) subplot(2,2,4) mesh(peaks(20)) mesh(peaks(20)) mesh(peaks(20)) mesh(peaks(20)) view(-37.5,30) view(-7,80) view(-90,0) view(-7,-10) 7 10 0 -10 20 10 00 10 10 0 -10 20 15 10 20 5 00 5 10 15 20 10 10 5 5 0 -5 -10 20 0 -5 -10 0 0 10 20 20 15 10 5 Example 5 0 5 10 15 Controlling Axes You can control the scaling and appearance of plot axis with the axis function. To set scaling for the x- and y- axes on the current 2-D plot, use this command: axis( xmin xmax ymin ymax]) To scale the axes on 3-D plot, use this: axis( xmin xmax ymin ymax zmin zmax]) In addition, returns the axis scaling to its default where the best axis limits are computed automatically axis('square') makes the current axis box square in size, otherwise a circle will look like an oval axis('o ') turns o the axes axis('on') turns on axis labeling and tic marks. axis('auto') 8...
View Full Document

This note was uploaded on 03/01/2010 for the course ELECTRONIC 12345 taught by Professor Xyz during the Summer '10 term at Punjab Engineering College.

Ask a homework question - tutors are online