Help me draw the region in matlab ?

3 次查看(过去 30 天)
For the region ,draw the region D and color the region D. a) D : x^2 + y^2 = 2x, x^2 + y^2 = 2y b) x^2 + y62 <= 2y, 0<=x<=y*sqrt(3) thanks very much.

采纳的回答

Image Analyst
Image Analyst 2013-12-24
Why don't you solve the equation for y, then use linspace() to create a vector for x? Plug that vector into your equation to get values for y, and then plot them with plot(x, y, 'ro-') and see what you have and what regions get formed. Then use patch() or fill() to color the region.
  3 个评论
Nguyen Trong Nhan
Nguyen Trong Nhan 2013-12-24
Oh, I have done it and I see the problem. thanks you very much.
Image Analyst
Image Analyst 2013-12-24
You could use plot(), which you probably did. Can you mark the Answer as Accepted to close it out?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by