Help me draw the region in matlab ?

4 vues (au cours des 30 derniers jours)
Nguyen Trong Nhan
Nguyen Trong Nhan le 24 Déc 2013
Commenté : Image Analyst le 24 Déc 2013
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.
  2 commentaires
Image Analyst
Image Analyst le 24 Déc 2013
Is this homework?
Nguyen Trong Nhan
Nguyen Trong Nhan le 24 Déc 2013
for this homework, I have never seen before

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 24 Déc 2013
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 commentaires
Nguyen Trong Nhan
Nguyen Trong Nhan le 24 Déc 2013
Oh, I have done it and I see the problem. thanks you very much.
Image Analyst
Image Analyst le 24 Déc 2013
You could use plot(), which you probably did. Can you mark the Answer as Accepted to close it out?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by