Question
1. Three-Dimensional Plots. The variable z is defined as: z = 3 * (1 x) .^2 .* exp(-(x .^2) (y + 1) .^2) 10*(x/5 x
1. Three-Dimensional Plots. The variable z is defined as: z = 3 * (1 x) .^2 .* exp(-(x .^2) (y + 1) .^2) 10*(x/5 x .^ 3 y .^5) .* exp(-x .^2 -y .^2) (1/3) * exp(-(x + 1) .^2 y .^2) Notice, that z is defined in MATLAB notation, not in standard mathematical notation! The .-symbol and elipsis -symbol have special meanings in MATLAB. We want z to be a two-dimensional matrix determined by the values of x and y. Create a vector x, from -3 to +3 with 100 values. Create a vector y, from -1 to +1 with 100 values. (Hint: Remember there is a builtin MATLAB function that will generate n values between some lower bound and some upper bound.) Thus far, x, y and z are all vectors, i.e., one-dimensional matrices. Use the meshgrid function to map x and y into two-dimensional matrices, then use the new two-dimensional versions to calculate z. a. Use the mesh plotting function to create a three-dimensional plot of z. b. Use the surf function to create a three-dimensional plot of z. Compare the results that you generate using a single input (z), or inputs for all three-dimensions (x, y, z). c. Modify your surface plot with interpolated shading. Try using at least two colormaps. d. Generate a contour plot of z. e. Generate a combination surface, contour plot pf z.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started