You are given a function u(x, y) where u(x, y) = 3(1 −3x)² e− 3x² − (3y + 1)² – 10 [(3/5)x – 27x²³ - 243y³] e-9x² - 5y²
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
You are given a function u(x, y) where u(x, y) = 3(1 −3x)² e− 3x² − (3y + 1)² – 10 [(3/5)x – 27x²³ - 243y³] e-9x² - 5y²
You are given a function u(x, y) where u(x, y) = 3(1 −3x)² e− 3x² − (3y + 1)² – 10 [(3/5)x – 27x²³ - 243y³] e-9x² - 5y² − (1/3) e¯ (3x + 1)² − 9y² + x² + y² − 1 The surface described by z = u(x, y) represents the elevation throughout a national park at each point (x, y) in the park. The park boundaries are at x = 1, y = 1, x = −1 and y = −1. Create a contour plot of u(x, y) with 20 isoclines and a suitable color bar. Use a 100 × 100 grid. Add to your plot, the field of gradient vectors given by Vu(x, y), for each of the points on a uniform 20 × 20 grid. Here is the code for u, which you can simply copy and paste directly into your script file: 3* (1-3*x).^2. *exp(-3*x.^2 - (3*y+1).^2) ... 10* (3*x/5 27*x.^3 243*y.^5).*exp(-9*x.^2-5*y.^2) - 1/3*exp(- (3*x+1).^2 - 9*y.^2) + (x.^2+y.^2) - 1; Use your First Name, Last Name, and Student Number as the title for the graph (e.g., 'Johnny Good, 1234567').