Matlab Sheet 3 - Solution. Plotting in Matlab

Similar documents
Matlab Sheet 3. Plotting in Matlab

Math 308 Week 8 Solutions

Introduction to Differential Equations

Section 3.7: Mechanical and Electrical Vibrations

Date: 1 April (1) The only reference material you may use is one 8½x11 crib sheet and a calculator.

CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

Date: 31 March (1) The only reference material you may use is one 8½x11 crib sheet and a calculator.

Lecture XXVI. Morris Swartz Dept. of Physics and Astronomy Johns Hopkins University November 5, 2003

MATH 251 Week 6 Not collected, however you are encouraged to approach all problems to prepare for exam

MATH 2053 Calculus I Review for the Final Exam

MA26600 FINAL EXAM INSTRUCTIONS December 13, You must use a #2 pencil on the mark sense sheet (answer sheet).

Sinusoids. Amplitude and Magnitude. Phase and Period. CMPT 889: Lecture 2 Sinusoids, Complex Exponentials, Spectrum Representation

Physics 41 HW Set 1 Chapter 15 Serway 8 th ( 7 th )

Oscillations. PHYS 101 Previous Exam Problems CHAPTER. Simple harmonic motion Mass-spring system Energy in SHM Pendulums

Old Exams - Questions Ch-16

June 2011 PURDUE UNIVERSITY Study Guide for the Credit Exam in (MA 262) Linear Algebra and Differential Equations

APPLICATIONS OF DERIVATIVES UNIT PROBLEM SETS

Chapter 16 Waves. Types of waves Mechanical waves. Electromagnetic waves. Matter waves

MATH 23 Exam 2 Review Solutions

Ordinary Differential equations

Physics with Matlab and Mathematica Exercise #1 28 Aug 2012

dx n a 1(x) dy

Chapter One Introduction to Oscillations

AP Physics C Summer Homework. Questions labeled in [brackets] are required only for students who have completed AP Calculus AB

Solving systems of first order equations with ode Systems of first order differential equations.

Spring 2015 Sample Final Exam

Traveling Harmonic Waves

2.3 Oscillation. The harmonic oscillator equation is the differential equation. d 2 y dt 2 r y (r > 0). Its solutions have the form

Sample Questions Exam II, FS2009 Paulette Saab Calculators are neither needed nor allowed.

c) xy 3 = cos(7x +5y), y 0 = y3 + 7 sin(7x +5y) 3xy sin(7x +5y) d) xe y = sin(xy), y 0 = ey + y cos(xy) x(e y cos(xy)) e) y = x ln(3x + 5), y 0

Waves Part 1: Travelling Waves

Matlab Sheet 2. Arrays

α(t) = ω 2 θ (t) κ I ω = g L L g T = 2π mgh rot com I rot

Noise - irrelevant data; variability in a quantity that has no meaning or significance. In most cases this is modeled as a random variable.

Good Vibes: Introduction to Oscillations

MATH1910Chapter2TestReview

Section 4.9; Section 5.6. June 30, Free Mechanical Vibrations/Couple Mass-Spring System

Name: ID: Math 233 Exam 1. Page 1

2. Determine whether the following pair of functions are linearly dependent, or linearly independent:

DIFFERENTIAL EQUATIONS

Math Exam 02 Review

Practice problems from old exams for math 132 William H. Meeks III

Homework 1 Solutions

No Lecture on Wed. But, there is a lecture on Thursday, at your normal recitation time, so please be sure to come!

Dynamic Modeling. For the mechanical translational system shown in Figure 1, determine a set of first order

Vectors and Projectile Motion on the TI-89

Applications of Second-Order Differential Equations

Simulation, Transfer Function

Example force problems

1. (10 points) Find the general solution to the following second-order differential equation:

PHYSICS ADMISSIONS TEST Thursday, 2 November Time allowed: 2 hours

Final Exam Spring 2014 May 05, 2014

. CALCULUS AB. Name: Class: Date:

Volumes of Solids of Revolution Lecture #6 a

x gm 250 L 25 L min y gm min

Lecture 6: Differential Equations Describing Vibrations

Virginia Tech Math 1226 : Past CTE problems

8 Example 1: The van der Pol oscillator (Strogatz Chapter 7)

State Space Representation

Differential Equations and Linear Algebra Exercises. Department of Mathematics, Heriot-Watt University, Edinburgh EH14 4AS

Practice Final Exam Solutions

Waves Part 3A: Standing Waves

4.9 Free Mechanical Vibrations

Session 3. Question Answers

FLUIDS Problem Set #3 SOLUTIONS 10/27/ v y = A A = 0. + w z. Y = C / x

UNIVERSITY OF BOLTON WESTERN INTERNATIONAL COLLEGE FZE BENG(HONS) MECHANICAL ENGINEERING SEMESTER TWO EXAMINATION 2016/2017 ENGINEERING PRINCIPLES 2

Chapter 16 Solutions

Chapter 15 Oscillations

1) SIMPLE HARMONIC MOTION/OSCILLATIONS

Ï ( ) Ì ÓÔ. Math 2413 FRsu11. Short Answer. 1. Complete the table and use the result to estimate the limit. lim x 3. x 2 16x+ 39

EDEXCEL NATIONAL CERTIFICATE UNIT 28 FURTHER MATHEMATICS FOR TECHNICIANS OUTCOME 3 TUTORIAL 1 - TRIGONOMETRICAL GRAPHS

QUESTION 1: Find the derivatives of the following functions. DO NOT TRY TO SIMPLIFY.

DRAFT - Math 101 Lecture Note - Dr. Said Algarni

Multiple Choice Answers. MA 114 Calculus II Spring 2013 Final Exam 1 May Question

a. Follow the Start-Up Procedure in the laboratory manual. Note the safety rules.

1.1. BASIC ANTI-DIFFERENTIATION 21 + C.

1 Oscillations MEI Conference 2009

UNIVERSITY OF HOUSTON HIGH SCHOOL MATHEMATICS CONTEST Spring 2018 Calculus Test

Introduction Course Goals Review Topics. MCE371: Vibrations. Prof. Richter. Department of Mechanical Engineering. Handout 1 Fall 2017

Exam 2 Spring 2014

MA 266 Review Topics - Exam # 2 (updated)

Spring 2015, MA 252, Calculus II, Final Exam Preview Solutions

Math 2413 General Review for Calculus Last Updated 02/23/2016

Practice Questions From Calculus II. 0. State the following calculus rules (these are many of the key rules from Test 1 topics).

Thursday, August 4, 2011

MATH2351 Introduction to Ordinary Differential Equations, Fall Hints to Week 07 Worksheet: Mechanical Vibrations

Math 147 Exam II Practice Problems

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Mechanical Engineering Dynamics and Control II Fall 2007

Math 308 Exam I Practice Problems

Problem Weight Total 100

Do not write below here. Question Score Question Score Question Score

Differential Equations

Solutions to the Homework Replaces Section 3.7, 3.8

Physics 2101 S c e t c i cti n o 3 n 3 March 31st Announcements: Quiz today about Ch. 14 Class Website:

A B = AB cos θ = 100. = 6t. a(t) = d2 r(t) a(t = 2) = 12 ĵ

MATH 151, SPRING 2018

The most up-to-date version of this collection of homework exercises can always be found at bob/math365/mmm.pdf.

Chapter 14 (Oscillations) Key concept: Downloaded from

SOLUTIONS TO MIXED REVIEW

RED. Physics 105 Final Exam Hess Colton CID NO TIME LIMIT. CLOSED BOOK/NOTES. 1 m 3 = 1000 L stress = F/A; strain = L/L. g=9.

Transcription:

f(x) Faculty of Engineering Spring 217 Mechanical Engineering Department Matlab Sheet 3 - Solution Plotting in Matlab 1. a. Estimate the roots of the following equation by plotting the equation. x 3 3x 2 + 5x sin ( πx 4 5π 4 ) + 3 = b. Use the estimates found in part a to find the roots more accurately with the fzero function. row clc; clear;clf x = (-2:.1:4); y=x.^3-3*x.^2+5*x.*sin(pi*x/4-5*pi/4)+3; plot(x,y) xlabel('x'),ylabel('f(x)'),grid z=fzero('x.^3-3*x.^2+5*x.*sin(pi*x/4-5*pi/4)+3',3.8) From the plot with either method we can estimate the roots to be x =.5, 1.1, and 3.8. b) Then use the fzero function as follows, for the point x = 3.8. Repeating these steps for the estimates at.5 and 1.1, all of these methods give the roots x =.4795, 1.1346, and 3.8318. In Command Window: z = 3.8318 5-5 -1-15 -2-25 -2-1 1 2 3 4 x Dr./ Ahmed Nagib Elmekawy 1 of 21 Matlab Sheet 3 Solution

Force (Newtons) Faculty of Engineering Spring 217 Mechanical Engineering Department 2. Plot columns 2 and 3 of the following matrix A versus column 1. The data in column 1 are time (seconds). The data in columns 2 and 3 are force (newtons). A = [,-7,6;5,-4,3;1,-1,9;15,1,;2,2,-1]; plot(a(:,1),a(:,2:3)) xlabel('time (seconds)'), ylabel('force (Newtons)') gtext('column 1'),gtext('Column 2') 1 8 6 Column 2 4 2-2 -4-6 Column 1-8 2 4 6 8 1 12 14 16 18 2 Time (seconds) Dr./ Ahmed Nagib Elmekawy 2 of 21 Matlab Sheet 3 Solution

Percent Error x and sin(x) Error: sin(x) - x Faculty of Engineering Spring 217 Mechanical Engineering Department 3. Many applications use the following small angle approximation for the sine to obtain a simpler model that is easy to understand and analyze. This approximation states that sin x x, where x must be in radians. Investigate the accuracy of this approximation by creating three plots. For the first, plot sin x and x versus x for x 1. For the second, plot the approximation error sin x - x versus x for x 1. For the third, plot the relative error [sin(x) - x]/sin(x) versus x for x 1. How small must x be for the approximation to be accurate within 5 percent? x = :.1:1; subplot(2,2,1) plot(x,sin(x),x,x) xlabel('x (radians)'),ylabel('x and sin(x)') gtext('x'),gtext('sin(x)') subplot(2,2,2) plot(x,abs(sin(x)-x)) xlabel('x (radians)'),ylabel('error: sin(x) - x') subplot(2,2,3) plot(x,abs(1*(sin(x)-x))./sin(x)),xlabel('x (radians)'),... ylabel('percent Error'),grid 1.5 x sin(x).2.15.1.5.5 1 x (radians).5 1 x (radians) 2 15 1 5.5 1 x (radians) Dr./ Ahmed Nagib Elmekawy 3 of 21 Matlab Sheet 3 Solution

Left and Right Sides Faculty of Engineering Spring 217 Mechanical Engineering Department 4. You can use trigonometric identities to simplify the equations that appear in many applications. Confirm the identity tan(2x) = 2 tan x/(1 - tan 2 x) by plotting both the left and the right sides versus x over the range x 2π. x =:.1:2*pi; left = tan(2*x); right = 2*tan(x)./(1-tan(x).^2); plot(x,left,'-rs',x,right) xlabel('x (radians)') ylabel('left and Right Sides') legend('left','right','location', 'best') 1 5-5 -1-15 -2 Left Right -25 1 2 3 4 5 6 7 x (radians) Dr./ Ahmed Nagib Elmekawy 4 of 21 Matlab Sheet 3 Solution

x(t), y(t) Faculty of Engineering Spring 217 Mechanical Engineering Department 5. The following functions describe the oscillations in electric circuits and the vibrations of machines and structures. Plot these functions on the same plot. Because they are similar, decide how best to plot and label them to avoid confusion. x(t) = 1 e.5t sin(3t + 2) y(t) = 7 e.4t cos(5t 3) t = :.2:1; x = 1*exp(-.5*t).*sin(3*t+2); y = 7*exp(-.4*t).*cos(5*t-3); plot(t,x,t,y,':') xlabel('t'),ylabel('x(t), y(t)') legend('x(t)','y(t)') 1 8 x(t) y(t) 6 4 2-2 -4-6 -8 1 2 3 4 5 6 7 8 9 1 t Dr./ Ahmed Nagib Elmekawy 5 of 21 Matlab Sheet 3 Solution

Displacement y (Inches) Faculty of Engineering Spring 217 Mechanical Engineering Department 6. In certain kinds of structural vibrations, a periodic force acting on the structure will cause the vibration amplitude to repeatedly increase and decrease with time. This phenomenon, called beating, also occurs in musical sounds. A particular structure s displacement is described by y(t) = 1 f 1 2 f 2 2 [cos(f 2t) cos(f 1 t)] where y is the displacement in mm and t is the time in seconds. Plot y versus t over the range t 2 for f 1 = 8 rad/sec andf 2 = 1 rad/sec. Be sure to choose enough points to obtain an accurate plot. t = :.2:2; y = (1/(64-1))*(cos(8*t)-cos(t)); plot(t,y) xlabel('t (seconds)') ylabel('displacement y (Inches)').4.3.2.1 -.1 -.2 -.3 -.4 2 4 6 8 1 12 14 16 18 2 t (seconds) Dr./ Ahmed Nagib Elmekawy 6 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 7. Oscillations in mechanical structures and electric circuits can often be t τ y(t) = e sin(ωt + φ) where t is time and ω is the oscillation frequency in radians per unit time. The oscillations have a period of 2π/ω, and their amplitudes decay in time at a rate determined by τ, which is called the time constant. The smaller τ is, the faster the oscillations die out. a. Use these facts to develop a criterion for choosing the spacing of the t values and the upper limit on t to obtain an accurate plot of y(t). (Hint: Consider two cases: 4τ > 2π ω and 4τ < 2π ω) b. Apply your criterion, and plot y(t) for τ = 1, ω = π and φ = 2. c. Apply your criterion, and plot y(t) for τ =.1, ω = π and φ = 2. % Part a t = :.2:4; y = exp(-t/1).*sin(pi*t+2); plot(t,y) xlabel('t'),ylabel('y') title('part a') %Part b figure(2) t2 = :.1:.4; y2 = exp(-t2/.1).*sin(8*pi*t2+2); plot(t2,y2) xlabel('t'),ylabel('y') title('part b') Dr./ Ahmed Nagib Elmekawy 7 of 21 Matlab Sheet 3 Solution

y y Faculty of Engineering Spring 217 Mechanical Engineering Department s: 1 Part a.8.6.4.2 -.2 -.4 -.6 -.8-1 5 1 15 2 25 3 35 4 t 1 Part b.8.6.4.2 -.2 -.4.5.1.15.2.25.3.35.4 t Dr./ Ahmed Nagib Elmekawy 8 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 8. The vibrations of the body of a helicopter due to the periodic force applied by the rotation of the rotor can be modeled by a frictionless spring-mass-damper system subjected to an external periodic force. The position x(t) of the mass is given by the equation: x(t) = 2f o ω 3 n ω 3 sin (ω n ω 2 t) sin ( ω n + ω 2 where F(t) = F sin ωt, and f = F /m, ω is the frequency of the applied force, and ω n is the natural frequency of the helicopter. When the value of ω is close to the value of ω n, the vibration consists of fast oscillation with slowly changing amplitude called beat. Use f = 12 N/kg, ω n =1 rad/s, and ω=12 rad/s to plot x(t) as a function of t for t 1 s. t) clc; clear;clf f=12; wn=1; w=12; t=:.1:1; x=2*f/(wn^3-w^3)*sin((wn-w)*t/2).*... sin((wn+w)*t/2) plot(t,x) title('helicopter Body Vibrations') xlabel('time, s') ylabel('displacement, m') Dr./ Ahmed Nagib Elmekawy 9 of 21 Matlab Sheet 3 Solution

Displacement, m Faculty of Engineering Spring 217 Mechanical Engineering Department.4 Helicopter Body Vibrations.3.2.1 -.1 -.2 -.3 -.4 1 2 3 4 5 6 7 8 9 1 Time, s Dr./ Ahmed Nagib Elmekawy 1 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 9. A railroad bumper is designed to slow down a rapidly moving railroad car. After a 2, kg railroad car traveling at 2 m/s engages the bumper, its displacement x (in meters) and velocity v (in m/s) as a function of time t (in seconds) is given by: Plot the displacement and the velocity as a function of time for t 4 s. Make two plots on one page. t=:.1:4; x=4.219*(exp(-1.58*t)-exp(-6.32*t)); v=26.67*exp(-6.32*t)-6.67*exp(-1.58*t); subplot(2,1,1) plot(t,x) title('railroad Bumper Response') ylabel('position, m') subplot(2,1,2) plot(t,v) ylabel('speed, m/s') xlabel('time, s') Dr./ Ahmed Nagib Elmekawy 11 of 21 Matlab Sheet 3 Solution

Speed, m/s Position, m Faculty of Engineering Spring 217 Mechanical Engineering Department 2 Railroad Bumper Response 1.5 1.5.5 1 1.5 2 2.5 3 3.5 4 2 15 1 5-5.5 1 1.5 2 2.5 3 3.5 4 Time, s Dr./ Ahmed Nagib Elmekawy 12 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 1. The curvilinear motion of a particle is defined by the following parametric equations: The velocity of the particle is given by, where v x = dx dt and v y = dy dt. x = 52t 9t 2 m and y = 125t 5t 2 m v = v x 2 + v y 2 For t 5 s make one plot that shows the position of the particle (y versus x), and a second plot (on the same page) of the velocity of the particle as a function of time. In addition, by using MATLAB s min function, determine the time at which the velocity is the lowest, and the corresponding position of the particle. Using an asterisk marker, show the position of the particle in the first plot. For time use a vector with spacing of.1 s. t=:.1:5; x=52*t-9*t.^2; y=125-5*t.^2; vx=52-18*t; vy=-1*t; v=sqrt(vx.^2+vy.^2); [vmin indx]=min(v); tmin=t(indx); subplot(2,1,1) plot(x,y,x(indx),y(indx),'*') title('particle Dynamics') xlabel('x(m)') Dr./ Ahmed Nagib Elmekawy 13 of 21 Matlab Sheet 3 Solution

speed(m/s) y(m) Faculty of Engineering Spring 217 Mechanical Engineering Department ylabel('y(m)') text(4,8,['time of min speed = ',... num2str(tmin,'%.1f'),' s']) subplot(2,1,2) plot(t,v) xlabel('time(s)') ylabel('speed(m/s)') 15 Particle Dynamics 1 5 time of min speed = 2.2 s 1 2 3 4 5 6 7 8 x(m) 8 6 4 2.5 1 1.5 2 2.5 3 3.5 4 4.5 5 time(s) Dr./ Ahmed Nagib Elmekawy 14 of 21 Matlab Sheet 3 Solution

speed(m/s) Faculty of Engineering Spring 217 Mechanical Engineering Department 11. The demand for water during a fire is often the most important factor in the design of distribution storage tanks and pumps. For communities with populations less than 2,, the demand Q (in gallons/min) can be calculated by: where P is the population in thousands. Plot the water demand Q as a function of the population P (in thousands) for P 2. Label the axes and provide a title for the plot. P=:2; Q=12*sqrt(P).*(1-.1*sqrt(P)); plot(p,q) title('small Community Fire Fighting Water Needs') xlabel('population, Thousands') ylabel('water Demand, gal/min') ylabel('speed(m/s)') 14 Small Community Fire Fighting Water Needs 12 1 8 6 4 2 2 4 6 8 1 12 14 16 18 2 Population, Thousands Dr./ Ahmed Nagib Elmekawy 15 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 12. A In a typical tension test a dog bone shaped specimen is pulled in a machine. During the test, the force F needed to pull the specimen and the length L of a gauge section are measured. This data is used for plotting a stress-strain diagram of the material. Two definitions, engineering and true, exist for stress and strain. The engineering stress and strain are defined by σ e = F A and ε e = L L o L o where L o and A o are the initial gauge length and the initial cross-sectional area of the specimen, respectively. The true stress σ t and strain ε t are defined by σ t = F and ε A L t = ln L. o L o L The following are measurements of force and gauge length from a tension test with an aluminum specimen. The specimen has a round cross section with radius 6.4 mm (before the test). The initial gauge length is L o =25 mm. Use the data to calculate and generate the engineering and true stress-strain curves, both on the same plot. Label the axes and use a legend to identify the curves. Units: When the force is measured in newtons (N) and the area is calculated in m 2, the unit of the stress is pascals (Pa). L=.254; r=.64; A=pi*r^2; F=[ 1331 21485 31963 34727 37119 3796 3955... 4758 4986 4176 41255 41481 41564]; L=[25.4 25.474 25.515 25.575 25.615 25.693 25.752 25.978... 26.419 26.52 26.6 26.728 27.13 27.441]/1; sigmae=f/a; ee=(l-l)/l; sigmat=f.*l/(a*l); et=log(l/l); Dr./ Ahmed Nagib Elmekawy 16 of 21 Matlab Sheet 3 Solution

Stress, Pa Faculty of Engineering Spring 217 Mechanical Engineering Department plot(ee,sigmae,et,sigmat,'--') title('stress-strain Definitions') legend('engineering','true','location','southeast') xlabel('strain') ylabel('stress, Pa') 3.5 x 18 Stress-Strain Definitions 3 2.5 2 Engineering True 1.5 1.5.1.2.3.4.5.6.7.8.9 Strain Dr./ Ahmed Nagib Elmekawy 17 of 21 Matlab Sheet 3 Solution

Height, m Faculty of Engineering Spring 217 Mechanical Engineering Department 13. The shape of a symmetrical four-digit NACA airfoil is described by the equation where c is the cord length and t is the maximum thickness as a fraction of the cord length ( tc= maximum thickness). Symmetrical four-digit NACA airfoils are designated NACA XX, where XX is 1t (i.e., NACA 12 has t=.12 ). Plot the shape of a NACA 2 airfoil with a cord length of 1.5 m. t=.2; c=1.5; xc=:.1:1; y1=t*c/.2*(.2969*sqrt(xc)-.126*xc... -.3516*xc.^2+.2843*xc.^3-.115*xc.^4); y2=-y1; plot(xc*c,y1,xc*c,y2) axis equal title('naca 2 Airfoil') xlabel('width, m') ylabel('height, m') NACA 2 Airfoil.5.4.3.2.1 -.1 -.2 -.3 -.4 -.5.5 1 1.5 Width, m Dr./ Ahmed Nagib Elmekawy 18 of 21 Matlab Sheet 3 Solution

Faculty of Engineering Spring 217 Mechanical Engineering Department 14. The position as a function of time of a squirrel running on a grass field is given in polar coordinates by: Plot the trajectory (position) of the squirrel for t 2 s. clc; clear;clf t=:.1:2; r=25+3*(1-exp(sin(.7*t))); theta=2*pi*(1-exp(-.2*t)); polar(theta,r) title('squirrel Trajectory (m)') Squirrel Trajectory (m) 9 3 12 6 15 2 1 3 18 21 33 24 27 3 Dr./ Ahmed Nagib Elmekawy 19 of 21 Matlab Sheet 3 Solution

y z Faculty of Engineering Spring 217 Mechanical Engineering Department 15. Obtain the surface and contour plots for the function showing the minimum at x = y =. z = x 2 2xy + 4y 2 [X,Y] = meshgrid(-4:.4:4); Z = X.^2-2*X.*Y+4*Y.^2; subplot(2,1,1) mesh(x,y,z) xlabel('x'),ylabel('y') zlabel('z'),grid subplot(2,1,2) contour(x,y,z),xlabel('x'), ylabel('y') 2 1 4 2 y -2-4 -4-2 x 2 4 4 2-2 -4-4 -3-2 -1 1 2 3 4 x Dr./ Ahmed Nagib Elmekawy 2 of 21 Matlab Sheet 3 Solution

y T Faculty of Engineering Spring 217 Mechanical Engineering Department 16. A square metal plate is heated to 8 C at the corner corresponding to x = y =1. The temperature distribution in the plate is described by T = 8 e (x 1)2 e 3(y 1)2 Obtain the surface and contour plots for the temperature. Label each axis. What is the temperature at the corner corresponding to x = y =? [X,Y] = meshgrid(:.1:1); T = 8*exp(-(X-1).^2).*exp(-3*(Y-1).^2); subplot(2,1,1) mesh(x,y,t) xlabel('x'),ylabel('y') zlabel('t'),grid subplot(2,1,2) contour(x,y,t) xlabel('x'), ylabel('y') T(1,1) In Command Window: ans = 1.4653 1 5 1.5 y.2 x.4.6.8 1 1.8.6.4.2.1.2.3.4.5.6.7.8.9 1 x Dr./ Ahmed Nagib Elmekawy 21 of 21 Matlab Sheet 3 Solution