The following function describes the temperature distribution on a rectangular plate for the range 2 x
Question:
The following function describes the temperature distribution on a rectangular plate for the range −2 ≤ x ≤ 0 and 0 ≤ y ≤ 3
T = 2 + x − y + 2x2 + 2xy + y2
Develop a script to:
(a) Generate a meshplot of this function using the MATLAB function surfc. Employ the linspace function with default spacing (i.e., 100 interior points) to generate the x and y values.
(b) Use the MATLAB function interp2 with the default interpolation option ('linear') to compute the temperature at x = –1.63 and y = 1.627. Determine the percent relative error of your result.
(c) Repeat (b), but with 'spline'.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted: