- Create anonymous functions for both of your functions, perhaps calling them ‘p’ for the polynomial and ‘c’ for the circle,
- Plot the polynomial as ‘ezplot(p, [xmin xmax ymin ymax])’ and the same for the circle,
- See the documentation for the hold function,
- See the documentation for the axis function (so the circle looks like a circle and not an ellipse).
How to write an M-file that uses ezplot to display a graph and a circle on the same figure ?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kosmas-Damianos Giannakos
el 11 de Mzo. de 2016
Comentada: Star Strider
el 11 de Mzo. de 2016
Write an M-file that use ezplot to display the graph of 2x^2+xy+y^4=1 and the circle x^2+y^2=1, on the same figure.
with graphing window where x and y vary from -1.2 to +1.2. help please
0 comentarios
Respuestas (1)
Star Strider
el 11 de Mzo. de 2016
Editada: Star Strider
el 11 de Mzo. de 2016
This is obviously a homework assignment.
That should give you your plot.
2 comentarios
Star Strider
el 11 de Mzo. de 2016
I can’t make it work with symbolic functions either. That’s the reason I suggested using anonymous functions. I can make it work with them.
I rarely use ezplot (and it’s obsolete starting with R2016a), so I only use it with anonymous functions.
Ver también
Categorías
Más información sobre Line Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!