Develop a script to generate the same computations and plots as in Sec. 21.8, but for the
Question:
Develop a script to generate the same computations and plots as in Sec. 21.8, but for the following functions (for x = –3 to 3 and y = –3 to 3):
(a) f(x, y) = e−(x2 + y2) and
(b) f(x, y) = xe−(x2 + y2).
Transcribed Image Text:
21.8 CASE STUDY VISUALIZING FIELDS Background. Beyond the determination of derivatives in one dimension, the gradient function is also quite useful for determining partial derivatives in two or more dimensions. In particular, it can be used in conjunction with other MATLAB functions to produce vi- sualizations of vector fields. To understand how this is done, we can return to our discussion of partial derivatives at the end of Sec. 21.1.1. Recall that we used mountain elevation as an example of a two- dimensional function. We can represent such a function mathematically as z=f(x,y) where z = elevation, x = distance measured along the east-west axis, and y = distance measured along the north-south axis. For this example, the partial derivatives provide the slopes in the directions of the axes. However, if you were mountain climbing, you would probably be much more interested in determining the direction of the maximum slope. If we think of the two partial derivatives as component vectors, the answer is provided very neatly by of Vf=i+ where Vf is referred to as the gradient of f. This vector, which represents the steepest slope. has a magnitude and a direction 0=tan where 0 = the angle measured counterclockwise from the x axis. Now suppose that we generate a grid of points in the x-y plane and used the foregoing equations to draw the gradient vector at each point. The result would be a field of arrows indicating the steepest route to the peak from any point. Conversely, if we plotted the nega- tive of the gradient, it would indicate how a ball would travel as it rolled downhill from any point. Such graphical representations are so useful that MATLAB has a special function, called quiver, to create such plots. A simple representation of its syntax is quiver (x, y,u,v) where x and y are matrices containing the position coordinates and u and v are matrices containing the partial derivatives. The following example demonstrates the use of quiver to visualize a field. Employ the gradient function to determine to partial derivatives for the following two- dimensional function: f(x,y)=y-x-21²-2xy-y²
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 83% (6 reviews)
Answered By
Zablon Gicharu
I am an educator who possesses the requisite skills and knowledge due to interacting with students for an extended period. I provide solutions to various problems in step-by-step explanations, a well-thought approach and an understandable breakdown. My goal is to impart more straightforward methodologies and understanding to students for more remarkable achievements.
5.00+
4+ Reviews
10+ Question Solved
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted:
Students also viewed these Mathematics questions
-
Develop a script to generate the same computations and plots as in Sec. 21.8, but for the MATLAB peaks function over ranges of both x and y from 3 to 3. 21.8 CASE STUDY VISUALIZING FIELDS Background....
-
Based on Example 3.6, develop a script to produce an animation of a bouncing ball where 0 = 5 m/s and 0 = 50. To do this, you must be able to predict exactly when the ball hits the ground. At this...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
NIU Company's budgeted sales and direct materials purchases are as follows: NIU's sales are 40% cash and 60% credit. It collects credit sales 10% in the month of sale, 50% in the month following...
-
Copperfield Mining Company owns two mines, each of which produces three grades of orehigh, medium, and low. The company has a contract to supply a smelting company with at least 12 tons of high-grade...
-
Briefly define each of the following: a. Distribution of sample means b. Expected value of M c. Standard error of M
-
10.A company contracted with a marketing firm to construct software and create a business website. A quote was requested and accepted. Sometime later, the business asked for updates and revisions but...
-
Michael Bolton Company follows the practice of pricing its inventory at the lower-of-cost-or-market, on an individual-item basis. Instructions From the information above, determine the amount of...
-
Two identical loudspeakers are driven in phase by a common oscillator at 880 Hz and face each other at a distance of 1.22 m. Locate the points along the line joining the two speakers where relative...
-
Write a program that reads a Celsius degree in a double value from the console, then converts it to Fahrenheit, and displays the result. The formula for the conversion is as follows: fahrenheit = (9...
-
How do the production and sales volume of a new product need to compare to its break-even point to make it worthwhile to introduce the product?
-
Repeat the the same simulations as in Section 22.6 for the Lorenz equations but generate the solutions with the midpoint method. 22.6 CASE STUDY An example of a simple nonlinear model based on...
-
A transverse sinusoidal wave is generated at one end of a long, horizontal string by a bar that moves up and down through a distance of 1.00 cm. The motion is continuous and is repeated regularly 120...
-
How would you calculate in Java, within the code below, the tax of how many hours an employee worked, and how much they get paid per hour? Heres the code I have so far: import java.util.Scanner;...
-
QUESTION 3: Write a professionally formatted email from Susan to Nichole thanking her for the research and instructing her to begin the design process for the Fields-Patterson website based on what...
-
In a certain city three car brands, A, B, C have 20%, 30% and 50% of the market share respectively. The probability that a car needs major repairs during its first year after purchase for the three...
-
Give a justification for why a validation administration may be utilized rather than people sharing keys. [2 marks] 2 Distributed Systems Explain how disseminated between process correspondence (IPC)...
-
consider debt instruments from the following countries and companies - which one would you consider highly speculative or junk bonds? microsoft brazil venezuela proctor and gamble
-
Apple CEO Steve Jobs has been quoted as saying: We dont know how to build a sub-$500 computer that is not a piece of junk. Jobs disdain for the under $500 price point for personal computers reflects...
-
On January 2, 20X3, Sheldon Bass, a professional engineer, moved from Calgary to Edmonton to commence employment with Acco Ltd., a large public corporation. Because of his new employment contract,...
-
Write equations for the darkened nodes in the grid in Figure. Note that all units are cgs. The convection coefficient is h c = 0.015 cal/(cm 2 C s) and the thickness of the plate is 1.5 cm. k = 0.7...
-
Apply the control volume approach to develop the equation for node (0, j) in Figure.
-
Derive an equation like Eq. (29.26) for the case where is greater than 45 for Figure.
-
discuss the role of intellectual property regimes in incentivizing innovation while balancing concerns related to knowledge sharing and equitable access to innovation outcomes?
-
Argentina can produce 2 pounds of coffee OR 1 bottle of wine. Brazil can produce 5 pounds of coffee OR 1 bottle of wine. Which country has a comparative advantage in wine production?
-
what ways do interdisciplinary collaborations foster innovation, and how do they transcend traditional boundaries to cultivate breakthrough solutions?
Study smarter with the SolutionInn App