|
 |
 |
 |
 |
 |
 |
 |
 |
 |
Step 2) create two vectors x and y . The
values
|
|
of x and y will determine the region in the
xy
|
|
plane over which the surface is plotted.
|
|
|
|
>> x = linspace(-3,3,7);
|
|
>> y = linspace(-2,2,5);
|
|
|
Step 3) Use the meshgrid function to create two
|
matrices, X and Y .
We will use these to
|
|
compute Z.
|
|
|
|
>> [X , Y] = meshgrid(x,y)
|
|
|
|