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...
-
Presented below is a partial amortization schedule for Mill Street Investors: Period Issue Date Cash Paid $4,100 4,100 Interest Expense $3,436 3,410 Increase in Carrying Value $664 690 Carrying Value...
-
List the main stakeholder groups in a company. Consider whether and why each stakeholder group might be interested in corporate eco-efficiency indicators. What level of information is each group most...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1 and 2. On September 1, Irene opened a retail store that specializes in sports car...
-
Is the Indian automobile market attractive for new foreign players? Why or why not? After two bad experiences with entry, is there any reason to believe PSA will succeed this time? Was PSA right to...
-
Karla Tanner opens a Web consulting business called Linkworks and completes the following transactions in its first month of operations. April 1 Tanner invests $80,000 cash along with office...
-
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...
-
Tiffany Lamp Company produces stained glass lamps appropriate for home and office use. The company expects sales to total approximately $50 million for the current year. Tiffanys management team has...
-
7. As investor, should you be happy about Starbucks' decision to pay a dividend? Should Starbucks have initiated a dividend sooner? Look at Starbuck's free cash flow to equity holders
-
ABC Company has the following obligations as of December 31: A promissory note or obligation to pay for $100,000 in 2 years; A 10-year mortgage payable for $300,000 payable in ten annual payments of...
-
July 31st Revenue 7900 Retained Earnings 7900 July 31st Income Summary 5200 Rent Expense 400 Wages Expense 1750 Repairs & Maintenance Expense 350 Supplies Expense 1400 Depriciation Expense 100 Income...
-
Why are U.S treasuries considered safe and how can one lose money by investing in them? How do investors use bond ratings when investing
-
Bill currently has no savings but would like to have accumulated $400,000 in his RRSP by the time he retires in 25 years approximately how much must bill save at the end of each month between now and...
-
Explain the forces at work that lead to the redistribution of income in your answer to Problem 8, in a way analogous to the explanation given in Section 8.4c for the redistribution of income in...
-
Suppose that you are part of a virtual team and must persuade other team members on an important matter (such as switching suppliers or altering the project deadline). Assuming that you cannot visit...
-
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.
-
Komatsu company's budget for sales was 1,000 of small size tractor for $1,200 per the tractor. The company's actual sales was $1,365,000, sales units for 1,300 bikes. What are the Sales Price...
-
Southland company is preparing a cash budget for august. The company has $16300 cash at the beginning of august and anticipates $124200 in cash receipts snd $133800 in cash payments during august....
-
Record the journal entries for the following transactions: Oct. 1 Dec. 31 July 1 Borrowed $20,000 from the bank and signed a 9 month note payable with 9% interest. Record the adjusting journal entry...
Study smarter with the SolutionInn App