Download MuPAD from SciFace

MuPAD Pro Computing Essentials - Examples 

Example 6.7 - Using grid option 

The grid option is used to determine the accuracy of a plot. Let's see how it looks for a simple function. In this example we will use the function y=sin(x) with three different grid values: 5, 10, and 100.

export(plot, Function2d):
 
F1 := Function2d(
   sin(x), x=0..2*PI, y=-1..1,
   Grid = [5],
   Color = RGB::Red,
   LineWidth = 5
):
 
F2 := Function2d(
   sin(x), x=0..2*PI, y=-1..1,
   Grid = [10],
   Color = RGB::Blue,
   LineWidth = 10
):
 
F3 := Function2d(
   sin(x), x=0..2*PI, y=-1..1,
   Grid = [100],
   Color = RGB::Black,
   LineWidth = 15
):
 
plot(F1, F2, F3)

 

TOP