100% found this document useful (2 votes)
7 views

(eBook PDF) Essentials of MATLAB Programming 3rd Editiondownload

The document is a promotional and informational piece about the 'Essentials of MATLAB Programming 3rd Edition' eBook, highlighting its advantages for technical programming, including ease of use, platform independence, and a comprehensive library of predefined functions. It also discusses the pedagogical features of the book, such as quizzes and exercises designed to enhance student comprehension, and introduces the MindTap online course platform for an interactive learning experience. Additionally, it provides links to download the eBook and other related titles.

Uploaded by

damqngirbea
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
7 views

(eBook PDF) Essentials of MATLAB Programming 3rd Editiondownload

The document is a promotional and informational piece about the 'Essentials of MATLAB Programming 3rd Edition' eBook, highlighting its advantages for technical programming, including ease of use, platform independence, and a comprehensive library of predefined functions. It also discusses the pedagogical features of the book, such as quizzes and exercises designed to enhance student comprehension, and introduces the MindTap online course platform for an interactive learning experience. Additionally, it provides links to download the eBook and other related titles.

Uploaded by

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

(eBook PDF) Essentials of MATLAB Programming 3rd

Edition pdf download

https://ebookmass.com/product/ebook-pdf-essentials-of-matlab-
programming-3rd-edition/

Explore and download more ebooks at ebookmass.com


We have selected some products that you may be interested in
Click the link to download now or visit ebookmass.com
for more options!.

Essentials of Torts 3rd Edition – Ebook PDF Version

https://ebookmass.com/product/essentials-of-torts-3rd-edition-ebook-
pdf-version/

MATLAB Programming for Engineers 6th Edition Stephen J.


Chapman

https://ebookmass.com/product/matlab-programming-for-engineers-6th-
edition-stephen-j-chapman/

Corrections: The Essentials 3rd Edition, (Ebook PDF)

https://ebookmass.com/product/corrections-the-essentials-3rd-edition-
ebook-pdf/

(eBook PDF) Essentials of Sociology 3rd Edition by George


Ritzer

https://ebookmass.com/product/ebook-pdf-essentials-of-sociology-3rd-
edition-by-george-ritzer/
The ASAM Essentials of Addiction Medicine 3rd Edition,
(Ebook PDF)

https://ebookmass.com/product/the-asam-essentials-of-addiction-
medicine-3rd-edition-ebook-pdf/

Essentials of Public Health (Essential Public Health) 3rd


Edition, (Ebook PDF)

https://ebookmass.com/product/essentials-of-public-health-essential-
public-health-3rd-edition-ebook-pdf/

AACN Essentials of Progressive Care Nursing, Third Edition


(Chulay, AACN Essentials of Progressive Care Nursing) 3rd
Edition, (Ebook PDF)
https://ebookmass.com/product/aacn-essentials-of-progressive-care-
nursing-third-edition-chulay-aacn-essentials-of-progressive-care-
nursing-3rd-edition-ebook-pdf/

MATLAB: A Practical Introduction to Programming and


Problem Solving 4th Edition Stormy Attaway

https://ebookmass.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-4th-edition-stormy-attaway/

The Essentials of Risk Management, 3rd Edition Michel


Crouhy

https://ebookmass.com/product/the-essentials-of-risk-management-3rd-
edition-michel-crouhy/
ESSENTIALS OF ESSENTIALS OF

CHAPMAN
MATLAB
PROGRAMMING
MATLAB
PROGRAMMING

ESSENTIALS OF
STEPHEN J. CHAPMAN STEPHEN J. CHAPMAN

THIRD EDITION

MATLAB
PROGRAMMING
To register or access your online learning solution or purchase materials
for your course, visit www.cengagebrain.com.

3E

THIRD EDITION
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Preface | vii

The Advantages of MATLAB for Technical Programming


MATLAB has many advantages compared to conventional computer languages
for technical problem solving. Among them are:
1. Ease of use.
MATLAB is an interpreted language, like many versions of Basic. Like
Basic, it is very easy to use. The program can be used as a scratch pad
to evaluate expressions typed at the command line, or it can be used to
execute large prewritten programs. Programs may be easily written and
modified with the built-in integrated development environment, and de-
bugged with the MATLAB debugger. Because the language is so easy
to use, it is ideal for educational use, and for the rapid prototyping of
new programs.
Many program development tools are provided to make the pro-
gram easy to use. They include an integrated editor/debugger, online
documentation and manuals, a workspace browser, and extensive demos.
2. Platform independence.
MATLAB is supported on many different computer systems, and this
provides a large measure of platform independence. At the time of this
writing, the language is supported on Windows 7/8/10, Linux, and Mac
OS X 10.10 and 10.11. Programs written on any platform will run on all
of the other platforms, and data files written on any platform may be
read transparently on any other platform. As a result, programs writ-
ten in MATLAB can migrate to new platforms when the needs of the
user change.
3. Predefined functions.
MATLAB comes complete with an extensive library of predefined func-
tions that provide tested and prepackaged solutions to many basic tech-
nical tasks. For example, suppose that you are writing a program that
must calculate the statistics associated with an input data set. In most
languages, you would need to write your own subroutines or functions
to implement calculations such as the arithmetic mean, standard devia-
tion, median, etc. These and hundreds of other functions are built right
into the MATLAB language, making your job much easier.
In addition to the large library of functions built into the basic
MATLAB language, there are many special-purpose toolboxes available
to help solve complex problems in specific areas. For example, a user can
buy standard toolboxes to solve problems in Signal Processing, Control
Systems, Communications, Image Processing, and Neural Networks,
among many others.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
viii | Preface

4. Device-independent plotting.
Unlike other computer languages, MATLAB has many integral plot-
ting and imaging commands. The plots and images can be displayed
on any graphical output device supported by the computer on which
MATLAB is running. This capability makes MATLAB an outstanding
tool for visualizing technical data.
5. Graphical user interface.
MATLAB includes tools that allow a programmer to interactively con-
struct a graphical user interface (GUI) for his or her program. With
this capability, the programmer can design sophisticated data analysis
programs that can be operated by relatively inexperienced users.

Pedagogical Features
This book is specifically designed to be used in a first-year “Introduction to
Programming/Problem Solving” course. It should be possible to cover this material
comfortably in a 9-week, 3-hour-per-week course. If there is insufficient time to
cover all of the material in a particular engineering program, Chapters 8 and 9
may be deleted, and the remaining material will still teach the fundamentals of
programming and using MATLAB to solve problems. This feature should ap-
peal to harassed engineering educators trying to cram ever more material into a
finite curriculum.
The book includes several features designed to aid student comprehension.
A total of 14 quizzes appear scattered throughout the chapters, with answers
to all questions included in Appendix C. These quizzes can serve as a useful
self-test of comprehension. In addition, there are approximately 150 end-of-
chapter exercises. Answers to all exercises are included in the Instructor’s Man-
ual. Good programming practices are highlighted in all chapters with special
Good Programming Practice boxes, and common errors are highlighted in Pro-
gramming Pitfalls boxes. End-of-chapter materials include Summaries of Good
Programming Practice and Summaries of MATLAB Commands and Functions.

Instructor Resources
A detailed Instructor’s Solutions Manual containing solutions to all end-of-
chapter exercises is available via the secure, password-protected Instructor
Resource Center at https://sso.cengage.com. The Instructor Resource Center
also contains helpful Lecture Note PowerPoint slides, the MATLAB source code
for all examples in the book, and the source code for all of the solutions in the
Instructor’s Solutions Manual.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Preface | ix

A Final Note to the User


No matter how hard I try to proofread a document like this book, it is inevi-
table that some typographical errors will slip through and appear in print. If
you should spot any such errors, please drop me a note via the publisher at
globalengineering@cengage.com, and I will do my best to get them eliminated
from subsequent printings and editions. Thank you very much for your help in
this matter.
I will maintain a complete list of errata and corrections at the Instructor
Resource Center mentioned above. Please check that site for any updates and/
or corrections.

Acknowledgments
I would like to thank these reviewers who offered their helpful suggestion for
this edition:
David Eromom Georgia Southern University
Arlene Guest Naval Postgraduate School
Mary M. Hofle Idaho State University
Mark Hutchenreuther California Polytechnic State
University
Mani Mini Iowa State University
In addition I would like to acknowledge and thank my Global Engineering team
at Cengage Learning for their dedication to this edition:
Timothy Anderson, Product Director; Mona Zeftel, Senior Content Developer;
D. Jean Buttrom, Content Project Manager; Kristin Stine, Marketing Manager;
Elizabeth Murphy and Brittany Burden, Learning Solutions Specialists; Ashley
Kaupert, Associate Media Content Developer; Teresa Versaggi and Alexander
Sham, Product Assistants; and Rose Kernan of RPK Editorial Services, Inc.
They have skillfully guided every aspect of this text’s development and produc-
tion to successful completion.
In addition, I would like to thank my wife Rosa for her help and encourage-
ment over the more than 40 years we have spent together.
Stephen J. Chapman
Melbourne, Australia
November 8, 2015

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
MindTap Online Course

Essentials of MATLAB Programming is also avail-


able through MindTap, Cengage Learning’s digital
course platform. The carefully-crafted pedagogy
and exercises in this trusted textbook are made
even more effective by an interactive, customizable
eBook, automatically graded assessments, and a
full suite of study tools.
As an instructor using MindTap, you have at
your fingertips the full text and a unique set of tools,
all in an interface designed to save you time. Mind-
Tap makes it easy for instructors to build and cus-
tomize their course, so you can focus on the most
relevant material while also lowering costs for your
students. Stay connected and informed through real-
time student tracking that provides the opportunity
to adjust your course as needed based on analytics of
interactivity and performance. End-of-chapter assess-
ments test students’ knowledge of programming con-
cepts in each chapter. Tutorial videos help students
master MATLAB functionality, programming, and
concepts.

How does MindTap benefit instructors?


■ You can build and personalize your course by integrating your own
content into the MindTap Reader (like lecture notes or problem sets to
download) or pull from sources such as RSS feeds, YouTube videos, web-
sites, and more. Control what content students see with a built-in learning
path that can be customized to your syllabus.
x
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
MindTap Online Course | xi

MindTap saves you time by providing you and your


students with automatically graded assignments and


quizzes. These problems include immediate, specific
feedback, so students know exactly where they need
more practice.
■ The Message Center helps you to quickly and easily

contact students directly from MindTap. Messages


are communicated directly to each student via the
communication medium (email, social media, or
even text message) designated by the student.
■ StudyHub is a valuable studying tool that allows you to

deliver important information and empowers your stu-


dents to personalize their experience. Instructors can
choose to annotate the text with notes and highlights,
share content from the MindTap Reader, and create
flashcards to help their students focus and succeed.
■ The Progress App lets you know exactly how

your students are doing (and where they might be


struggling) with live analytics. You can see overall class engagement and
drill down into individual student performance, enabling you to adjust
your course to maximize student success.

How does MindTap benefit your students?


■ The MindTap Reader adds the abilities to have the content read aloud, to
print from the reader, and to take notes and highlights while also captur-
ing them within the linked StudyHub App.
■ The MindTap Mobile App keeps students connected with alerts and notifica-
tions while also providing them with on-the-go study tools like Flashcards and
quizzing, helping them manage their time efficiently.
■ Flashcards are pre-populated to provide a jump start on studying, and
students and instructors can also create customized cards as they move
through the course.
■ The Progress App allows students to monitor their individual grades, as
well as their level compared to the class average. This not only helps them
stay on track in the course but also motivates them to do more, and ulti-
mately to do better.
■ The unique StudyHub is a powerful single-destination studying tool that em-
powers students to personalize their experience. They can quickly and easily
access all notes and highlights marked in the MindTap Reader, locate book-
marked pages, review notes and Flashcards shared by their instructor, and
create custom study guides.
For more information about MindTap for Engineering, or to schedule a demon-
stration, please call (800) 354-9706 or email higheredcs@cengage.com. For those
instructors outside the United States, please visit http://www.cengage.com/contact/
to locate your regional office.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Contents

Chapter 1 Introduction to MATLAB 1


1.1 The Advantages of MATLAB 2
1.2 Disadvantages of MATLAB 3
1.3 The MATLAB Environment 4
1.3.1 The MATLAB Desktop 4
1.3.2 The Command Window 6
1.3.3 The Toolstrip 7
1.3.4 The Command History Window 8
1.3.5 The Document Window 8
1.3.6 Figure Windows 11
1.3.7 Docking and Undocking Windows 12
1.3.8 The MATLAB Workspace 12
1.3.9 The Workspace Browser 14
1.3.10 The Current Folder Browser 15
1.3.11 Getting Help 16
1.3.12 A Few Important Commands 18
1.3.13 The MATLAB Search Path 19
1.4 Using MATLAB as a Calculator 21
1.5 Summary 23
1.5.1 MATLAB Summary 23
1.6 Exercises 24

Chapter 2 MATLAB Basics 27


2.1 Variables and Arrays 27
xii
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Contents | xiii

2.2 Creating and Initializing Variables in MATLAB 31


2.2.1 Initializing V
Variables in Assignment Statements 31
2.2.2 Initializing with Shortcut Expressions 34
2.2.3 Initializing with Built-in Functions 35
2.2.4 Initializing V
Variables with Keyboard Input 36
2.3 Multidimensional Arrays 38
2.3.1 Storing Multidimensional Arrays in Memory 39
2.3.2 Accessing Multidimensional Arrays with One Dimension 40
2.4 Subarrays 40
2.4.1 The end Function 41
2.4.2 Using Subarrays on the Left-Hand Side
of an Assignment Statement 41
2.4.3 Assigning a Scalar to a Subarray 43
2.5 Special Values 43
2.6 Displa
Displaying Output Data 46
2.6.1 Changing the Default Format 46
2.6.2 The disp Function 48
2.6.3 Formatted Output with the fprintf Function 48
2.7 Data Files 49
2.8 Scalar and Array Operations 52
2.8.1 Scalar Operations 52
2.8.2 Array and Matrix Operations 53
2.9 Hierarchy of Operations 56
2.10 Built-in MATLAB Functions 59
2.10.1 Optional Results 60
2.10.2 Using MA
MATLAB Functions with Array Inputs 60
2.10.3 Common MA MATLAB Functions 60
2.11 Introduction to Plotting 62
2.11.1 Using Simple xy Plots 62
2.11.2 Printing a Plot 63
2.11.3 Exporting a Plot as a Graphical Image 64
2.11.4 Multiple Plots 66
2.11.5 Line Color
Color, Line Style, Marker Style, and Legends 67
2.11.6 Logarithmic Scales 70
2.12 Examples 71
2.13 Debugging MATLAB Programs 78
2.14 Summary 80
2.14.1 Summary of Good Programming Practice 81
2.14.2 MA
MATLAB Summary 82
2.15 Exercises 85

Chapter 3 Two-Dimensional Plots 93


3.1 Additional Plotting Features for Tw
T o-Dimensional Plots 93
3.1.1 Logarithmic Scales 93
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
xiv | Contents

3.1.2 Controlling x- and y-axis Plotting Limits 97


3.1.3 Plotting Multiple Plots on the Same Axes 100
3.1.4 Creating Multiple Figures 101
3.1.5 Subplots 101
3.1.6 Controlling the Spacing between Points on a Plot 104
3.1.7 Enhanced Control of Plotted Lines 107
3.1.8 Enhanced Control of Text Strings 108
3.2 Polar Plots 111
3.3 Annotating and Saving Plots 113
3.4 Additional T
Types of T
Two-Dimensional Plots 116
3.5 Using the plot Function with Two-Dimensional
T Arrays 121
3.6 Summary 123
3.6.1 Summary of Good Programming Practice 124
3.6.2 MATLAB Summary 124
3.7 Exercises 125

Chapter 4 Branching Statements and Program Design 129


4.1 Introduction to T
Top-Down Design T Techniques 129
4.2 Use of Pseudocode 133
4.3 The Logical Data TType 134
4.3.1 Relational and Logic Operators 134
4.3.2 Relational Operators 135
4.3.3 A Caution about the == and ~= Operators 136
4.3.4 Logic Operators 137
4.3.5 Logical Functions 142
4.4 Branches 144
4.4.1 The if Construct 144
4.4.2 Examples Using if Constructs 146
4.4.3 Notes Concerning the Use of if Constructs 152
4.4.4 The switch Construct 155
4.4.5 The try/catch Construct 156
4.5 More on Debugging MATLAB Programs 164
4.6 Summary 171
4.6.1 Summary of Good Programming Practice 171
4.6.2 MATLAB Summary 172
4.7 Exercises 172

Chapter 5 Loops and Vectorization 179


5.1 The while Loop 179
5.2 The for Loop 185
5.2.1 Details of Operation 192
5.2.2 Vectorization: A Faster Alternative to Loops 194
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Contents | xv

5.2.3 The MATLAB Just-In-Time (JIT) Compiler 195


5.2.4 The break and continue Statements 198
5.2.5 Nesting Loops 200
5.3 Logical Arrays and Vectorization 201
5.3.1 Creating the Equivalent of if/else Constructs
with Logical Arrays 202
5.4 The MATLAB Profiler 204
5.5 Additional Examples 207
5.6 The textread Function 222
5.7 Summary 223
5.7.1 Summary of Good Programming Practice 224
5.7.2 MATLAB Summary 224
5.8 Exercises 225

Chapter 6 Basic User - Defined Functions 235


6.1 Introduction to MATLAB Functions 236
6.2 Variable Passing in MATLAB: The Pass-by-Value Scheme 242
6.3 Optional Arguments 253
6.4 Sharing Data Using Global Memory 258
6.5 Preserving Data between Calls to a Function 265
6.6 Built-in MATLAB Functions: Sorting Functions 270
6.7 Built-in MATLAB Functions: Random Number Functions 272
6.8 Summary 272
6.8.1 Summary of Good Programming Practice 273
6.8.2 MATLAB Summary 273
6.9 Exercises 274

Chapter 7 Advanced Features of User-Defined Functions 283


7.1 Function Functions 283
7.2 Local Functions, Private Functions, and Nested Functions 288
7.2.1 Local Functions 288
7.2.2 Private Functions 289
7.2.3 Nested Functions 290
7.2.4 Order of Function Evaluation 292
7.3 Function Handles 293
7.3.1 Creating and Using Function Handles 293
7.3.2 The Significance of Function Handles 296
7.3.3 Function Handles and Nested Functions 297
7.3.4 An Example Application: Solving Ordinary
Differential Equations 299
7.4 Anonymous Functions 305
7.5 Recursive Functions 306
7.6 Plotting Functions 307
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
xvi | Contents

7.7 Histograms 310


7.8 Summary 316
7.8.1 Summary of Good Programming Practice 316
7.8.2 MATLAB Summary 317
7.9 Exercises 317

Chapter 8 Additional Data Types and Plot Types 325


8.1 Complex Data 325
8.1.1 Complex Variables 327
8.1.2 Using Complex Numbers with Relational Operators 328
8.1.3 Complex Functions 329
8.1.4 Plotting Complex Data 334
8.2 Strings and String Functions 338
8.2.1 String Conversion Functions 338
8.2.2 Creating Two-Dimensional Character Arrays 339
8.2.3 Concatenating Strings 340
8.2.4 Comparing Strings 340
8.2.5 Searching/Replacing Characters within a String 344
8.2.6 Uppercase and Lowercase Conversion 345
8.2.7 Trimming Whitespace from Strings 345
8.2.8 Numeric-to-String Conversions 346
8.2.9 String-to-Numeric Conversions 348
8.2.10 Summary 349
8.3 Multidimensional Arrays 355
8.4 Three-Dimensional Plots 357
8.4.1 Three-Dimensional Line Plots 357
8.4.2 Three-Dimensional Surface, Mesh, and Contour Plots 358
8.4.3 Creating Three-Dimensional Objects Using Surface
and Mesh Plots 365
8.5 Summary 368
8.5.1 Summary of Good Programming Practice 368
8.5.2 MATLAB Summary 369
8.6 Exercises 371

Chapter 9 Cell Arrays, Structures, and Handle Graphics 377


9.1 Cell Arrays 377
9.1.1 Creating Cell Arrays 379
9.1.2 Using Braces {} as Cell Constructors 380
9.1.3 Viewing the Contents of Cell Arrays 381
9.1.4 Extending Cell Arrays 381
9.1.5 Deleting Cells in Arrays 384
9.1.6 Using Data in Cell Arrays 385
9.1.7 Cell Arrays of Strings 385
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Contents | xvii

9.1.8 The Significance of Cell Arrays 386


9.1.9 Summary of cell Functions 390
9.2 Structure Arrays 391
9.2.1 Creating Structure Arrays 391
9.2.2 Adding Fields to Structures 394
9.2.3 Removing Fields from Structures 395
9.2.4 Using Data in Structure Arrays 395
9.2.5 The getfield and setfield Functions 397
9.2.6 Dynamic Field Names 397
9.2.7 Using the size Function with Structure Arrays 399
9.2.8 Nesting Structure Arrays 399
9.2.9 Summary of structure Functions 400
9.3 Handle Graphics 401
9.3.1 The MATLAB Graphics System 402
9.3.2 Object Handles 403
9.3.3 Examining and Changing Object Properties 404
9.3.4 Changing Object Properties at Creation Time 404
9.3.5 Changing Object Properties after Creation Time 405
9.3.6 Examining and Changing Properties Using
Object Notation 405
9.3.7 Examining and Changing Properties Using
get/set Functions 407
9.3.8 Examining and Changing Properties Using
the Property Editor 409
9.3.9 Using set to List Possible Property Values 414
9.3.10 Finding Objects 415
9.3.11 Selecting Objects with the Mouse 417
9.4 Position and Units 420
9.4.1 Positions of figure Objects 420
9.4.2 Positions of axes and uicontrol Objects 421
9.4.3 Positions of text Objects 422
9.5 Printer Positions 425
9.6 Default and Factory Properties 425
9.7 Graphics Object Properties 427
9.8 Summary 428
9.8.1 Summary of Good Programming Practice 428
9.8.2 MATLAB Summary 429
9.9 Exercises 429

Appendix A UTF-8 Character Set 433


Appendix B MATLAB Input/Output Functions 435

Appendix C Answers to Quizzes 457

Appendix D MATLAB Functions and Commands 471

Index 479
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Chapter 1
Introduction to MATLAB

MATLAB (short for MATrix LABoratory) is a special-purpose computer program


optimized to perform engineering and scientific calculations. It started life as a pro-
gram designed to perform matrix mathematics, but over the years it has grown into
a flexible computing system capable of solving essentially any technical problem.
The MATLAB program implements the MATLAB programming language and
provides a very extensive library of predefined functions to make technical pro-
gramming tasks easier and more efficient. This book introduces the MATLAB lan-
guage as it is implemented in MATLAB Version 2014B and shows how to use it
to solve typical technical problems.
MATLAB is a huge program, with an incredibly rich variety of functions. Even the
basic version of MATLAB without any toolkits is much richer than other technical
programming languages. There are more than 1000 functions in the basic MATLAB
product alone, and the toolkits extend this capability with many more functions in
various specialties. Furthermore, these functions often solve very complex prob-
lems (solving differential equations, inverting matrices, and so forth) in a single step,
saving large amounts of time. Doing the same thing in another computer language
usually involves writing complex programs yourself or buying a third-party software
package (such as IMSL or the NAG software libraries) that contains the functions.
The built-in MATLAB functions are almost always better than anything that
an individual engineer could write on his or her own because many people have
worked on them, and they have been tested against many different data sets. These
functions are also robust, producing sensible results for wide ranges of input data
and gracefully handling error conditions.
This book makes no attempt to introduce the user to all of MATLAB’s func-
tions. Instead, it teaches a user the basics of how to write, debug, and optimize
good MATLAB programs, plus a subset of the most important functions used to
solve common scientific and engineering problems. Just as importantly, it teaches

1
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
2 | Chapter 1 Introduction to MATLAB

the scientist or engineer how to use MATLAB’s own tools to locate the right func-
tion for a specific purpose from the enormous list of choices available. In addition,
it teaches how to use MATLAB to solve many practical engineering problems, such
as vector and matrix algebra, curve fitting, differential equations, and data plotting.
The MATLAB program is a combination of a procedural programming language,
an integrated development environment (IDE) including an editor and debugger, and
an extremely rich set of functions to perform many types of technical calculations.
The MATLAB language is a procedural programming language, meaning that the
engineer writes procedures, which are effectively mathematical recipes for solving a
problem. This makes MATLAB very similar to other procedural languages such as C,
Basic, Fortran, and Pascal. However, the extremely rich list of predefined functions
and plotting tools makes it superior to these other languages for many engineering
analysis applications.

1.1 The Advantages of MATLAB


MATLAB has many advantages compared to conventional computer languages
for technical problem solving. Among them are:
1. Ease of use.
MATLAB is an interpreted language, like many versions of Basic. Like
Basic, it is very easy to use. The program can be used as a scratch pad to
evaluate expressions typed at the command line, or it can be used to exe-
cute large prewritten programs. Programs may be easily written and mod-
ified with the built-in integrated development environment and debugged
with the MATLAB debugger. Because the language is so easy to use, it is
ideal for the rapid prototyping of new programs.
Many program development tools are provided to make the program
easy to use. They include an integrated editor/debugger, online documen-
tation and manuals, a workspace browser, and extensive demos.
2. Platform independence.
MATLAB is supported on many different computer systems, providing a
large measure of platform independence. At the time of this writing, the
language is supported on Windows Vista/7/8/10, Linux, Unix and the
Macintosh. Programs written on any platform will run on all of the other
platforms, and data files written on any platform may be read transpar-
ently on any other platform. As a result, programs written in MATLAB
can migrate to new platforms when the needs of the user change.
3. Predefined functions.
MATLAB comes complete with an extensive library of predefined func-
tions that provide tested and prepackaged solutions to many basic tech-
nical tasks. For example, suppose that you are writing a program that
must calculate the statistics associated with an input data set. In most
languages, you would need to write your own subroutines or functions to
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
1.2 Disadvantages of MATLAB | 3

implement calculations such as the arithmetic mean, standard deviation,


median, and so forth. These and hundreds of other functions are built
right into the MATLAB language, making your job much easier.
In addition to the large library of functions built into the basic
MATLAB language, there are many special-purpose toolboxes avail-
able to help solve complex problems in specific areas. For example, a
user can buy standard toolboxes to solve problems in signal processing,
control systems, communications, image processing, and neural net-
works, among many others. There is also an extensive collection of
free user-contributed MATLAB programs that are shared through the
MATLAB website.
4. Device-independent plotting.
Unlike most other computer languages, MATLAB has many integral
plotting and imaging commands. The plots and images can be displayed
on any graphical output device supported by the computer on which
MATLAB is running. This capability makes MATLAB an outstanding
tool for visualizing technical data.
5. Graphical user interface.
MATLAB includes tools that allow an engineer to interactively construct
a Graphical User Interface (GUI) for his or her program. With this capa-
bility, the engineer can design sophisticated data analysis programs that
can be operated by relatively inexperienced users.
6. MATLAB compiler.
MATLAB’s flexibility and platform independence is achieved by com-
piling MATLAB programs into a device-independent p-code, and then
interpreting the p-code instructions at run-time. This approach is similar
to that used by Microsoft’s Visual Basic or by Java. Unfortunately, the
resulting programs can sometimes execute slowly because the MATLAB
code is interpreted rather than compiled. Recent versions of MATLAB
have partially overcome this problem by introducing just-in-time (JIT)
compiler technology. The JIT compiler compiles portions of the MAT-
LAB code as it is executed to increase overall speed.
A separate MATLAB compiler is also available. This compiler can
compile a MATLAB program into a standalone executable that can run
on a computer without a MATLAB license. It is a great way to convert
a prototype MATLAB program into an executable suitable for sale and
distribution to users.

1.2 Disadvantages of MATLAB


MATLAB has two principal disadvantages. The first is that it is an interpreted
language and therefore can execute more slowly than compiled languages. This
problem can be mitigated by properly structuring the MATLAB program to max-
imize the performance of vectorized code and by the use of the JIT compiler.
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
4 | Chapter 1 Introduction to MATLAB

The second disadvantage is cost: a full copy of MATLAB is five to ten times
more expensive than a conventional C or Fortran compiler. This relatively high
cost is more than offset by the reduced time required for an engineer or scientist
to create a working program, so MATLAB is cost-effective for businesses. How-
ever, it is too expensive for most individuals to consider purchasing. Fortunately,
there is also an inexpensive student edition of MATLAB, which is a great tool
for students wishing to learn the language. The student edition of MATLAB is
essentially identical to the full edition.1

1.3 The MATLAB Environment


The fundamental unit of data in any MATLAB program is the array. An array
is a collection of data values organized into rows and columns and known by a
single name. Individual data values within an array can be accessed by including
the name of the array followed by subscripts in parentheses, which identify the
row and column of the particular value. Even scalars are treated as arrays by
MATLAB—they are simply arrays with only one row and one column. We will
learn how to create and manipulate MATLAB arrays in Section 1.4.
When MATLAB executes, it can display several types of windows that accept
commands or display information. The three most important types of windows are
the Command Window, where commands may be entered; figure windows, which dis-
play plots and graphs; and edit windows, which permit a user to create and modify
MATLAB programs. We will see examples of all three types of windows in this section.
In addition, MATLAB can display other windows that provide help and
that allow the user to examine the values of variables defined in memory. We will
examine some of these additional windows here and examine the others when we
discuss how to debug MATLAB programs.

1.3.1 The MATLAB Desktop


When you start MATLAB Version 2014B, a special window called the MAT-
LAB desktop appears. The desktop is a window that contains other windows
showing MATLAB data, plus toolbars and a “Toolstrip” or “Ribbon Bar”
similar to that used by Microsoft Office. By default, most MATLAB tools are
docked to the desktop, so that they appear inside the desktop window. However,
the user can choose to undock any or all tools, making them appear in windows
separate from the desktop.
The default configuration of the MATLAB desktop is shown in Figure 1.1.
It integrates many tools for managing files, variables, and applications within the
MATLAB environment.

1
There are also some free software programs that are largely compatible with MATLAB, such as
GNU Octave and FreeMat.

Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
1.3 The MATLAB Environment | 5

Current Folder
This control allow
Browser
a user to view Launch the MATLAB
shows a list
or change the Help Browser Editor
of the files in the
current directory
current directory

Details Window
displays the Workspace Browser
MATLAB Command
properties of a file shows variables defined
Window
selected in the in workspace
Current Folder Browser

Figure 1.1 The default MATLAB desktop. The exact appearance of the desktop
may differ slightly on different types of computers.

The major tools within or accessible from the MATLAB desktop are:
■ Command Window
■ Toolstrip
■ Documents Window, including the Editor/Debugger and Array Editor
■ Figure Windows
■ Workspace Browser
■ Current Folder Browser, with the Details Window
■ Help Browser
■ Path Browser
■ Popup Command History Window
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
6 | Chapter 1 Introduction to MATLAB

Table 1.1: Tools and Windows Included in the MATLAB


Desktop
Tool Description
Command Window A window where the user can type commands
and see immediate results
Toolstrip A strip across the top of the desktop containing
icons to select functions and tools, arranged in
tabs and sections of related functions
Command History Window A window that displays recently used com-
mands, accessed by clicking the up arrow
when typing in the Command Window
Document Window A window that displays MATLAB files and
allows the user to edit or debug them
Figure Window A window that displays a MATLAB plot
Workspace Browser A window that displays the names and values
of variables stored in the MATLAB Workspace
Current Folder Browser A window that displays the names of files in
the current directory. If a file is selected in the
Current Folder Browser, details about the file
will appear in the Details Window
Help Browser A tool to get help for MATLAB functions,
accessed by clicking the Help button
Path Browser A tool to display the MATLAB search path,
accessed by clicking the Set Path button

The functions of these tools are summarized in Table 1.1. We will discuss
them in later sections of this chapter.

1.3.2 The Command Window


The bottom center of the default MATLAB desktop contains the Command
Window. A user can enter interactive commands at the command prompt (») in
the Command Window, and they will be executed on the spot.
As an example of a simple interactive calculation, suppose that you want
to calculate the area of a circle with a radius of 2.5 m. This can be done in the
MATLAB Command Window by typing:
» area = pi * 2.5^2
area =
19.6350
MATLAB calculates the answer as soon as the Enter key is pressed, and stores
the answer in a variable (really a 1 3 1 array) called area. The contents of the
variable are displayed in the Command Window as shown in Figure 1.2, and
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
1.3 The MATLAB Environment | 7

Result is added
to the workspace

User input

Result of
calculation

Figure 1.2 The Command Window appears in the center of the desktop.
Users enter commands and see responses here.

the variable can be used in further calculations. (Note that  is predefined in


MATLAB, so we can just use pi without first declaring it to be 3.141592. . . .)
If a statement is too long to type on a single line, it may be continued on suc-
cessive lines by typing an ellipsis (...) at the end of the first line, and then con-
tinuing on the next line. For example, the following two statements are identical.
x1 = 1 + 1/2 + 1/3 + 1/4 + 1/5 + 1/6
and
x1 = 1 + 1/2 + 1/3 + 1/4 ...
+ 1/5 + 1/6
Instead of typing commands directly in the Command Window, a series of
commands can be placed into a file, and the entire file can be executed by typing
its name in the Command Window. Such files are called script files. Script files
(and functions, which we will see later) are also known as M-files, because they
have a file extension of “.m”.

1.3.3 The Toolstrip


The Toolstrip (see Figure 1.3) is a bar of tools that appears across the top of
the desktop. The controls on the Toolstrip are organized into related categories
of functions, first by tabs and then by groups. For example, the tabs visible in
Copyright 2018 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Exploring the Variety of Random
Documents with Different Content
Chimie; l'analyse étant le seul moyen de conduire sûrement à la
connoissance des terres, des amendemens & des engrais: enfin la
Chimie pneumatique peut seule expliquer les grands phénomènes
de la végétation, la formation des différens principes des végétaux,
l'étiolement des plantes, &c. c'est elle qui nous a fait connoître
cette double émission d'un gaz homicide & d'un gaz vital.
Dans le petit nombre d'ouvrages qui ont été récemment publiés
sur la Chimie, tout étant neuf, la nomenclature, les faits,
l'application de la méthode des Géomètres à ces mêmes faits, & la
théorie entière, l'analyse d'un pareil Traité seroit une tâche longue
& difficile à remplir; nous nous bornerons donc à des réflexions sur
ce nouvel ordre de choses, qui, au milieu de beaucoup de
prosélites, a encore quelques détracteurs.
On peut établir comme vérité qu'il n'y a pas d'art mécanique, le
dernier de tous, dont la nomenclature ne soit moins vicieuse, moins
insignifiante, que ne l'étoit celle de l'ancienne Chimie. Pas un mot
dans l'ancienne langue chimique qui n'ait été enfanté par l'amour
du mystère, & quelquefois même par le charlatanisme. Glauber,
Stahl, emportés par le torrent & l'espèce de mode régnante alors,
introduisent, l'un, son sel admirable, l'autre, son double arcane. Un
mot neuf, mot qui n'a aucune acception, peut en recevoir une, il
n'en est pas de même d'un mot déjà usité.
Il falloit donc une langue nouvelle pour une nouvelle science,
des mots nouveaux pour de nouveaux produits; enfin, il falloit créer
des expressions pour les phénomènes que créoit journellement la
Chimie. Il importoit sur-tout que cette nomenclature fût raisonnée,
que le mot fixât l'idée, & que, semblable à la langue des Grecs &
des Latins, les augmentatifs, les privatifs, & le changement naître
des idées accessoires & précises, & c'est l'objet que remplissent,
par exemple, les mots soufre, sulfate, sulfite, sulfure. Tel est le but
qu'ont rempli les Savans qui se sont réunis pour former cette
nouvelle nomenclature, & le Traité de M. Lavoisier la rend très-
intelligible.
Rien de plus imposant dans l'ouvrage de M. Lavoisier que ce
nombre d'expériences ingénieuses, dont beaucoup lui
appartiennent, toutes présentées avec cette précision
mathématique, inconnue avant cette époque, que Rouelle avoit
devinée, & qui, soumettant l'analyse à la rigueur du calcul, fait le
complément de la science, en rendant la recomposition des corps
aussi facile que leur décomposition.
L'ancienne Chimie parvenoit bien quelquefois à la synthèse: elle
décomposoit & recomposoit l'alun, les vitriols, les sels neutres en
général, elle minéralisoit & révivifioit les métaux; mais l'eau, mais
l'air échappoient à son analyse. Elle les regardoit comme des corps
simples & élémentaires, il étoit réservé à la Chimie pneumatique de
leur faire subir la double loi de la décomposition & de la
recomposition.
Il nous reste à parler de la théorie, puisque nous sommes
restreints à des généralités. Cette théorie pose sur une grande
masse de faits, qui lui forment un rempart solide où elle paroît
inattaquable: elle ne le seroit pas, sans doute, si elle prétendoit
tout expliquer, mais elle sait s'arrêter quand les faits lui manquent,
ou qu'ils sont en trop petit nombre pour consolider de nouveaux
points de doctrine. Tel est le caractère de sagesse qui la distingue
de l'ancienne théorie, qui expliquoit tout de dix manières
différentes, parce qu'au défaut de routes, il faut se pratiquer des
sentiers. Dans la théorie actuelle, les faits s'enchaînent; chaque
proposition est étayée d'expériences qui se pressent, & on paroît
réduit à ne pouvoir pas en tirer d'autres conséquences que celles
que présente cette même théorie.
Nous pensons donc que cet Ouvrage, dont plusieurs chapitres
sont immédiatement applicables à la Physique de terminaison
devinssent autant de moyen de faire végétale, mérite l'approbation
de la Société Royale d'Agriculture.

Signé, de Fourcroy & Cadet de Vaux.


Je certifie cet Extrait conforme à l'original & au jugement de la
Société.
A Paris, ce 6 Février 1789.

Signé, Broussonet, Secrétaire perpétuel.

De l'Imprimerie de Chardon, rue de la Harpe. 1789.


Fautes à corriger, & Additions.
Page 43, lignes 4 & 9, copeaux lisez coupeaux
Page 44, ligne 9, figure 14 lis. figure 16
Page 75, ligne 14, dans un ballon e lis. dans le ballon cb.
Page 77, pén. mtreux lis. nitreux
Page 78, ligne 6, à mesure que l'acide passe ajoutez une partie se
condense dans le ballon, l'autre est absorbée par l'eau.
Page 94, ligne 21, ajoutez en note au bas de la page:
On a critiqué même avec assez d'amertume cette expression
hydrogène, parce qu'on a prétendu qu'elle signifioit fils de l'eau, &
non pas qui engendre l'eau. Mais qu'importe, si l'expression est
également juste dans les deux sens? les expériences rapportées
dans ce Chapitre, prouvent que l'eau, en se décomposant, donne
naissance à l'hydrogène, & sur-tout l'hydrogène donne naissance à
l'eau en se combinant avec l'oxigène. On peut donc dire également
que l'eau engendre l'hydrogène, & que l'hydrogène engendre l'eau.
Page 96, antépénul. Bc lis. BC
Page 118, ligne 22 & suiv. gaz hydrogène carbonisé, gaz hydrogène
sulfurisé, gaz hydrogène phosphorisé lis. carboné, sulfuré,
phosphoré. La même faute a pu échapper dans d'autres
endroits.
Page 133, pénul. & dern. ainsi les végétaux ne contiennent ni huile,
ni eau, ni acide carbonique, ajoutez la note suivante au bas de
la page:
Nota. On conçoit que je suppose ici des végétaux réduits à l'état
de dessication parfaite, & qu'à l'égard de l'huile, je n'entends pas
parler des végétaux qui en fournissent, soit par expression à froid,
soit par une chaleur qui n'excède pas celle de l'eau bouillante. Il
n'est ici question que de l'huile empyreumatique qu'on obtient par
la distillation à feu nud, à un degré de feu supérieur à l'eau
bouillante. C'est cette huile seule que j'annonce être un produit de
l'opération. On peut voir ce que j'ai publié à cet égard dans le
volume de l'Académie, année 1786.
Page 146, lignes 16 & 17, 397 livres 9 onces 29 grains lis. 460 livres
11 onces 6 gros 53 grains
Page 163, ligne 7, dont lis. que
Page 172, ligne 1, ammoniaque lis. ammoniac
Page 196, ligne 8, tartarique lis. tartareux
Ibid. ligne 11, pyrolignique lis. pyroligneux
Ibid. ligne 12, pyromucique lis. pyromuqueux
Ibid. ligne 13, pyrotartarique lis. pyrotartareux
Ibid. ligne 15, acétique lis. acéteux
Page 254, Supprimez du Tableau muriate oxygéné d'ammoniaque,
attendu que cette combinaison n'existe pas.
Page 294, lignes 14, 15 & 16, effacez & ce même sel saturé de
chaux, oxalate acidule de potasse & de chaux
Page 384, ligne 22, d'un robinet l lis. d'un robinet lm
Planches.
NOTES
~~~~~
[1] Partie 2, Chapitre I.
[2] Je donnerai ailleurs la définition de la liqueur qu'on
nomme éther, & j'en déveloperai les propriétés. Je me
contenterai de dire dans ce moment, qu'on désigne par ce
nom une liqueur inflammable très-volatile, d'une pesanteur
spécifique beaucoup moindre que l'eau, & même que
l'esprit-de-vin.
[3] Mém. Académ. 1780, page 335.
[4] On trouvera dans la dernière partie de cet Ouvrage,
le détail des procédés qu'on emploie pour séparer les
différentes espèces de gaz & pour les peser.
[A]Ajout dans l'errata du tome 2:
«On a critiqué même avec assez d'amertume cette
expression hydrogène, parce qu'on a prétendu qu'elle
signifioit fils de l'eau, & non pas qui engendre l'eau. Mais
qu'importe, si l'expression est également juste dans les deux
sens? les expériences rapportées dans ce Chapitre, prouvent
que l'eau, en se décomposant, donne naissance à
l'hydrogène, & sur-tout l'hydrogène donne naissance à l'eau
en se combinant avec l'oxigène. On peut donc dire
également que l'eau engendre l'hydrogène, & que
l'hydrogène engendre l'eau.»
[5] Voyez la description de cet appareil dans la troisième
partie de cet Ouvrage.
[B]Ajout dans l'errata du tome 2:
Nota. On conçoit que je suppose ici des végétaux réduits
à l'état de dessication parfaite, & qu'à l'égard de l'huile, je
n'entends pas parler des végétaux qui en fournissent, soit
par expression à froid, soit par une chaleur qui n'excede pas
celle de l'eau bouillante. Il n'est ici question que de l'huile
empyreumatique qu'on obtient par la distillation à feu nud, à
un degré de feu supérieur à l'eau bouillante. C'est cette
huile seule que j'annonce être un produit de l'opération. On
peut voir ce que j'ai publié à cet égard dans le volume de
l'Académie, année 1786.
[6] On regardera peut-être comme un défaut de la
méthode que j'ai adoptée, de m'avoir contraint à rejetter les
alkalis de la classe des sels, & je conviens que c'est un
reproche qu'on peut lui faire; mais cet inconvénient se
trouve compensé par de si grands avantages, que je n'ai pas
cru qu'il dût m'arrêter.
[7] Voyez Mémoires de l'Académie, année 1776, page
671, & 1778, page 535.
Au lecteur
~~~~~
Ce Traité élémentaire de chimie d'Antoine de Lavoisier se compose de deux
tomes. Une version complète de cette publication accompagne la publication
individuelle de chacun de ces deux tomes.
La version électronique html restitue le mieux la présentation du livre papier.
L'errata de cette édition a été pris en compte.
Nous avons utilisé une typographie plus moderne que celle de la version
papier en remplaçant les ſ par des s.
La ponctuation n'a pas été modifiée hormis quelques corrections mineures.
L'orthographe a été conservée. Seuls quelques mots ont été modifiés. Ils sont
soulignés par des tirets. Passer la souris sur le mot pour voir le texte original.
*** END OF THE PROJECT GUTENBERG EBOOK TRAITÉ
ÉLÉMENTAIRE DE CHIMIE, TOMES 1 & 2 ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you


derive from the use of Project Gutenberg™ works
calculated using the method you already use to calculate
your applicable taxes. The fee is owed to the owner of the
Project Gutenberg™ trademark, but he has agreed to
donate royalties under this paragraph to the Project
Gutenberg Literary Archive Foundation. Royalty payments
must be paid within 60 days following each date on which
you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly
marked as such and sent to the Project Gutenberg Literary
Archive Foundation at the address specified in Section 4,
“Information about donations to the Project Gutenberg
Literary Archive Foundation.”

• You provide a full refund of any money paid by a user


who notifies you in writing (or by e-mail) within 30 days of
receipt that s/he does not agree to the terms of the full
Project Gutenberg™ License. You must require such a user
to return or destroy all copies of the works possessed in a
physical medium and discontinue all use of and all access
to other copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full


refund of any money paid for a work or a replacement
copy, if a defect in the electronic work is discovered and
reported to you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookmasss.com

You might also like