Grafer
Jakob Schmid 2004-10-26
Dette worksheet omhandler brugen af grafer i Maple.
plot
> | restart; |
Vi kan nemt tegne en enkelt graf. Intervallet angives for x i [-4;2]
> | plot(x^2+2*x, x=-4 .. 2); |
Vi kan nemt tegne en mængde grafer i samme koordinatsystem:
> | plot({x, x^2, x^3, x^4}, x=-2 .. 2); |
Hvis vi skal bruge nogle mere avancerede graftyper, skal vi inkludere 'plots'-pakken:
> | with(plots): |
Warning, the name changecoords has been redefined
... f.eks. en graf i et polært koordinatsystem:
> | polarplot( theta+sin(theta*6)*5, theta = 0..8*Pi); |
... eller et 3D-plot af en funktion:
> | plot3d( sin(x) * cos(y), x=0..2*Pi, y=0..2*Pi, style=patch, axes=boxed, projection=normal ); |
> |
> |