0% found this document useful (0 votes)
34 views33 pages

Ch01 AboutMATLAB 3rd Ed

Uploaded by

Shahril Mohamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views33 pages

Ch01 AboutMATLAB 3rd Ed

Uploaded by

Shahril Mohamad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 33

-5

-4.5
Rate of Change

About MATLAB®
Rate of temperature change, degrees/hour

-4

-3.5

Chapter 1
-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

100

200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore. © 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited
reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying,
recording, or likewise. For information regarding permission(s), write to: Rights and Permissions Department, Pearson Education,
Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Objectives
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

After studying this chapter you should be


-1.5

-1

-0.5

able to:
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Understand what MATLAB is and why


it is widely used in engineering and
science
• Understand the advantages and
100

200

300

limitations of the student edition of


MATLAB
400

500
100 200 300 400 500

• Formulate problems by using a


structured problem-solving approach

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Section 1.1
What is MATLAB?
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

• MATLAB is one of a number of


-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

commercially available,
sophisticated mathematical
computation tools
• Others include
100

200

300

400

500
• Maple
100 200 300 400 500

• Mathematica
• MathCad

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change MATLAB excels at:
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Numerical calculations
-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Especially involving matrices


• Graphics
100

200
• MATLAB stands for
Matrix Laboratory
300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Why MATLAB
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Easy to use
-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Versatile
• Built in programming language
• Not a general purpose language
100

200

like C++ or Java


300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

MATLAB was originally


-2.5

-2

-1.5

-1

-0.5

written in Fortran, then later


0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

rewritten in C
100

200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change MATLAB 7
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• MATLAB is updated regularly


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Versions that predate


MATLAB 5.5 are substantially
100

200
different
300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Release Numbers
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• The Mathworks packages their


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

software in groups, called releases


• Release 2011a includes
100

200
• MATLAB 7.12
300

400
• Simulink 7.7
• A number of specialized “toolboxes”
500
100 200 300 400 500

This book is based on Release 2011a

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change
Releases
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• New releases are issued twice a


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

year in the spring and in the fall

100

200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Section 1.2
Student Edition of MATLAB
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• MATLAB comes in both a student and


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

professional edition
• Student editions are available for
• Windows Operating Systems
100

200
• Mac OS
300

400 • Linux
500

• The student edition typically lags the


100 200 300 400 500

professional edition by one release

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
The student edition of
release 2011a includes
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Full featured MATLAB 7.12


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Simulink 7.7
• Symbolic toolbox based on MuPad
• Limited number of other commonly
100

200

used toolboxes
300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
The command prompt is the
-5

-4.5
Rate of Change
biggest difference you’ll
notice
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

>> is the command prompt for the


professional version
100

200

300

EDU>> is the command prompt for


400

500
100 200 300 400 500

the student version

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Section 1.3
-5

-4.5
Rate of Change How is MATLAB used in
Industry?
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Widespread, especially in the


signal processing field
100

200
• Tool of choice in Academia for
300

400
most engineering fields
• Some examples….
500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Electrical Engineering
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

100

200

300

400 These images simulate the visual system used in a housefly


500
100 200 300 400 500 brain to detect collisions. The techniques developed are
being used in autonomous robot systems that depend upon
vision for navigation. The data was processed using MATLAB

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Biomedical Engineering
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

100

200

300

400

500
100 200 300 400 500

These images were created from MRI scan data using MATLAB.
The actual data set is included with the standard MATLAB
installation, allowing you experiment with manipulating the data
yourself.

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Fluid Dynamics
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

100

200

300

400

500
100 200 300 400 500

Results from a finite element analysis code were post processed


using MATLAB to create this image.

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Section 1.4
-5

-4.5
Rate of Change
Problem Solving in
Engineering and Science
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

1. State the Problem


2. Describe the input and output
100

200

300
3. Develop an algorithm
4. Solve the problem
400

500
100 200 300 400 500

5. Test the solution

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change State the Problem
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• If you don’t have a clear


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

understanding of the problem, it’s


unlikely that you’ll be able to solve
100 it
• Drawing a picture often helps you
200

300

400

500
100 200 300 400 500
understand the system better

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Describe the Input
and Output
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Be careful to include units


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Identify constants
• Label your sketch
• Group information into tables
100

200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Develop an Algorithm
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Identify any equations relating the


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

knowns and unknowns


• Work through a simplified version
100

200
of the problem by hand or with a
300

400
calculator
500
100 200 300 400 500

• Developing a flow chart is often


useful for complicated problems

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Solve the problem
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Create a MATLAB solution


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Be generous with comments, so


that others can follow your work
100

200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Test the Solution
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

• Compare to the hand solution


-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Do your answers make sense


physically?
100
• Is your answer really what was
200

300
asked for?
• Graphs are often useful ways to
400

500
100 200 300 400 500

check your calculations for


reasonableness
MATLAB for Engineers 3E, by Holly Moore.
© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

If you use a consistent problem


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

solving strategy you increase the


chance that your result is correct
100

200

300

400
Here’s an example….
500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Example 1.1
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Albert Einstein
-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• E=mc2
• The sun is fueled by
the conversion of
100 matter to energy
• How much matter
200

300

400

500
does the sun
consume every
100 200 300 400 500

day?

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change State the Problem
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Find the amount of matter


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

necessary to produce the amount


of energy radiated by the sun
100 everyday
200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Describe the Input
and Output
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Input
-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Rate of energy radiation


• E = 385*1024 Joules/second
100 • Speed of light
• c = 3.0*108 meters/second
200

300

• Output
400

500
100 200 300 400 500

• Mass in kilograms

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Develop an Algorithm –
Hand Example
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• The energy radiated in one day is:


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

J sec hours
385  10  360024
 24 * 1day  3.33  10 31 J
sec hour day

• Rearrange E=mc2 and solve for m


100

200

300

400

500
• m=E/c2
3.33  10 31 J
100 200 300 400 500

J
m  3.7  10 14

3.0 10 m / sec 8 2


m 2 / sec 2

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change But the units are wrong!!
Rate of temperature change, degrees/hour

-4

-3.5

-3

J
-2.5

-2

3.7 10
-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
14
time, hour

2 2
m / sec

100

200
1 J = 1 kg m2/sec2
300

400

2 2
kg m / sec
500
100 200 300 400 500

 3.7  10 2 2
 3.7  10 kg
14 14

m / sec
MATLAB for Engineers 3E, by Holly Moore.
© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Develop a MATLAB Solution
to Solve the Problem
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

• We’ll start learning the details of


-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

how to use MATLAB in the next


chapter.
100 • However, you can see from the
following demonstration just how
200

300

easy it is to use the command


400

500
100 200 300 400 500

window

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

Enter theyou
Notice
Now
Once
NowOnce value
that
enter
enterhit for the
the
the
the E
value
enter
Enter theagain,
value for c,
at key,
the command
ofequation
Ethe
is updated
equation
result to
program
isto calculate
change
repeated
the speed of light
prompt
based
the
repeats
the on
mass
your
energy
back your
to you input.
rateinfrom
the
calculation
Notice
kJ/day the
commandto use
kJ/s. of
window
scientific notation in the
100
result
200

300

400

500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Test your Solution
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• Matches the hand solution


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• Is it reasonable?
• Consider…
• Mass of the sun = 2*1020 kg
100

200

• How long would it take to consume


300

400

all that mass?


500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
time = (mass of the sun)/(rate of consumption)
Rate of Change
-5

-4.5
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

2  10 30 kg year
time  *  1 . 5  10 13
years
3.7  10 kg / day 365days
14

100

200

300

400
That’s 15 trillion years!!
Yes – this is a reasonable
500
100 200 300 400 500

result

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.
-5

-4.5
Rate of Change Summary
Rate of temperature change, degrees/hour

-4

-3.5

-3

-2.5

-2

-1.5

• MATLAB is widely used


-1

-0.5

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
time, hour

• MATLAB is easy to use


• A systematic problem solving
100

200
strategy makes it more likely
300

400
you’ve found the right answer
500
100 200 300 400 500

MATLAB for Engineers 3E, by Holly Moore.


© 2011 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved.
This material is protected by Copyright and written permission should be obtained from the publisher prior to any prohibited reproduction, storage
in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information
regarding permission(s), write to:
Rights and Permissions Department, Pearson Education, Inc., Upper Saddle River, NJ 07458.

You might also like