Preventing matlab to display distorted graphics/Displaying real objects

Usually matlab will displaying our graph in different aspect ratio

to manage put the following code after your draw your object

set(gca,'DataAspectRatio',[1 1 1]);

Here one example of distorted 3D plot

A distorted 3D plot

A distorted 3D plot

and here the 3D plot example of the object

Surface Result

Surface Result

Easy right!!??? :D :D

Actually, it took me 4 months for searching this code :), and finally i found it :D

Reference : http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/f4-48363.html

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s