Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

How to plot a contour plot of 2-dimensional array within specified limits of array size?

Asked by Ashutosh

Ashutosh (view profile)

on 13 Nov 2013
Latest activity Commented on by Walter Roberson

Walter Roberson (view profile)

on 14 Nov 2013

I want to plot contour plots of temperature which is the output of my program. It is a 2D plot so. I am plotting with the following command [cout hand] = contour(theta). In the program I get values of theta(i,j) for i in the range of 2 to 17 and j from 2 to 29. However the plot of theta shows it from i and j starting from zero. How should I plot such that I get it from point (2,2).

0 Comments

Ashutosh

Ashutosh (view profile)

Products

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 13 Nov 2013
axis([2 17], [2 29])

2 Comments

Ashutosh

Ashutosh (view profile)

on 14 Nov 2013

Can you please explain how to put it exactly? I have used this command [cout hand]= contour(theta)

How to incorporate axis limits in this?

Walter Roberson

Walter Roberson (view profile)

on 14 Nov 2013
contour(theta);
axis([2 17], [2 29]);
Walter Roberson

Walter Roberson (view profile)

Contact us