Thread Subject: Really interesting!

Subject: Really interesting!

From: Mansel Oliver

Date: 4 Sep, 2009 08:00:17

Message: 1 of 3

Hey,

I'm kinda new to matlab. Can anyone help me with this problem:

A function is defined as sqrt(x^2 +(y-3)^2)

I need to write a matlab problem to draw a contour plot of the function in the domain where x varies from 0 to 5 and y from 0 to 5. But a quadrant of radius 2 with centre at the orgin cut through the area. Use a mesh grid of 201x201 and at least 10 contour lines. THe color outside the domain should be white. It seems functions meshgrid,colormap and contourf should be used.

Subject: Really interesting!

From: Jos

Date: 4 Sep, 2009 09:11:01

Message: 2 of 3

"Mansel Oliver" <mansel.oliver@gmail.com> wrote in message <h7qheh$9qv$1@fred.mathworks.com>...
> Hey,
>
> I'm kinda new to matlab. Can anyone help me with this problem:
>
> A function is defined as sqrt(x^2 +(y-3)^2)
>
> I need to write a matlab problem to draw a contour plot of the function in the domain where x varies from 0 to 5 and y from 0 to 5. But a quadrant of radius 2 with centre at the orgin cut through the area. Use a mesh grid of 201x201 and at least 10 contour lines. THe color outside the domain should be white. It seems functions meshgrid,colormap and contourf should be used.

So, what have you done so far for this homework problem? Where did you get stuck?
Also, choose a better subject line in the future

Jos

Subject: Really interesting!

From: Ulf Graewe

Date: 4 Sep, 2009 09:14:02

Message: 3 of 3


> I need to write a matlab problem to draw a contour plot of the function in the domain where x varies from 0 to 5 and y from 0 to 5. But a quadrant of radius 2 with centre at the orgin cut through the area. Use a mesh grid of 201x201 and at least 10 contour lines. THe color outside the domain should be white. It seems functions meshgrid,colormap and contourf should be used.


So that you learn something from your homework, simply start by typing the following into the command line

doc meshgrid
doc colormap
doc contour

In the help you will find some help (sounds weird right!)

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
homework Ulf Graewe 4 Sep, 2009 05:19:04
homework Jos (10584) 4 Sep, 2009 05:14:04
contourf Mansel Oliver 4 Sep, 2009 04:04:03
finite element Mansel Oliver 4 Sep, 2009 04:04:03
meshgrid Mansel Oliver 4 Sep, 2009 04:04:03
contour Mansel Oliver 4 Sep, 2009 04:04:03
mesh Mansel Oliver 4 Sep, 2009 04:04:03
rssFeed for this Thread

Contact us at files@mathworks.com