我想编写代码首先显示正方形,然后在方框内将两个椭圆相互正交。请帮我。我是Matlab的新手。我知道matlab的所有基础知识。
答案 0 :(得分:1)
以下代码应该有效:
pdeellip(0, 0, 1, 0.5, 0) % Draw firste ellipse with center (0,0)
pdeellip(0, 0, 0.5, 1, 0) % Draw firste ellipse with center (0,0)
epderect([-1 1 -1 1]) % Parameters are [xMin xMax yMin yMax]
您应该阅读有关绘制矩形和椭圆的文档: http://www.mathworks.com/help/pde/ug/pderect.html http://www.mathworks.com/help/pde/ug/pdeellip.html
您将看到这些功能所采用的参数,然后您可以根据需要更改参数。