(eBook PDF) Essentials of MATLAB Programming 3rd Edition 2024 scribd download
(eBook PDF) Essentials of MATLAB Programming 3rd Edition 2024 scribd download
com
https://ebooksecure.com/product/ebook-pdf-
essentials-of-matlab-programming-3rd-edition/
https://ebooksecure.com/product/ebook-pdf-matlab-programming-for-
engineers-6th-edition/
ebooksecure.com
https://ebooksecure.com/download/matlab-programming-for-engineers-
ebook-pdf/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-matlab-a-practical-
introduction-to-programming-and-problem-solving-4th-edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-mental-health-nursing-
dimensions-of-praxis-third-edition/
ebooksecure.com
(eBook PDF) CJ 2019 1st Edition by James A. Fagin
https://ebooksecure.com/product/ebook-pdf-cj-2019-1st-edition-by-
james-a-fagin/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-hursts-the-heart-13th-
edition/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-introduction-to-finance-
markets-investments-and-financial-management-16th-edition/
ebooksecure.com
https://ebooksecure.com/download/5-steps-to-a-5-ap-physics-1-algebra-
based-2024-elite-student-edition-ebook-pdf-2/
ebooksecure.com
https://ebooksecure.com/product/ebook-pdf-human-sexuality-diversity-
in-contemporary-america-9th/
ebooksecure.com
(eBook PDF) Contacts: Langue et culture fran?aises (World
Languages) 9th Edition
https://ebooksecure.com/product/ebook-pdf-contacts-langue-et-culture-
franaises-world-languages-9th-edition/
ebooksecure.com
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
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
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
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
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. Linnaeus Sp. Pl. 475. 1753. 2. Duhamel Traite des Arb. 2:93, 95, 96.
1768. 3. Seringe DC. Prodr. 2:533. 1825. 4. Hooker Brit. Fl. 220. 1830. 5.
London Arb. Fr. Brit. 1844. 6. De Candolle Or. Cult. Pl. 212. 1885. 7.
Schwarz Forst. Bot. 338. 1892. 8. Koch, W. Syn. Deut. und Schw. Fl.
1:727. 1892. 9. Dippel Handb. Laubh. 3:636. 1893. 10. Lucas Handb.
Obst. 429. 1893. 11. Waugh Bot. Gaz. 26:417-27. 1898. 12. Bailey Cyc.
Am. Hort. 1448. 1901. 13. Waugh Plum Cult. 14. 1901. 14. Schneider
Handb. Laubh. 1:630. 1906.
P. communis domestica. 15. Hudson Fl. Anglic. 212. 1778. 16. Bentham
Handb. Brit. Fl. 1:236. 1865.
P. œconomica (in part) and P. italica (in part). 17. Borkhausen Handb.
Forstb. 2:1401, 1409. 1803. 18. Koch, K. Dend. 1:94, 96. 1869. 19.
Koehne Deut. Dend. 316. 1893.
Pliny gives the first clear account of Domestica plums and speaks of
them as if they had been but recently introduced. His account is as
follows:[8] “Next comes a vast number of varieties of the plum, the
particolored, the black, the white, the barley plum, so-called because it is
ripe at Barley harvest, and another of the same color as the last, but
which ripens later, and is of a larger size, generally known as the ‘Asinina,’
from the little esteem in which it is held. There are the onychina, too, the
cerina,—more esteemed, and the purple plum; the Armenian, also an
exotic from foreign parts, the only one among the plums that
recommends itself by its smell. The plum tree grafted on the nut exhibits
what we may call a piece of impudence quite its own, for it produces a
fruit that has all the appearance of the parent stock, together with the
juice of the adopted fruit; in consequence of its being thus compounded
of both, it is known by the name of ‘nuci-pruna.’ Nut-prunes, as well as
the peach, the wild plum and the cerina, are often put in casks and so
kept till the crop comes of the following year. All the other varieties ripen
with the greatest rapidity and pass off just as quickly. More recently, in
Baetica, they have begun to introduce what they call ‘malina,’ or the fruit
of the plum engrafted on the apple tree, and ‘amygdalina,’ the fruit of the
plum engrafted on the almond tree, the kernel found in the stone of these
last being that of the almond. Indeed, there is no specimen in which two
fruits have been more ingeniously combined in one. Among the foreign
trees we have already spoken of the Damascene plum, so-called from
Damascus, in Syria, but introduced long since into Italy, though the stone
of this plum is larger than usual, and the flesh small in quantity. This plum
will never dry so far as to wrinkle; to effect that, it needs the sun of its
own native country. The myxa, too, may be mentioned as being the fellow
countryman of the Damascene; it has of late been introduced into Rome
and has been grown engrafted upon the sorb.”
“The better sorts which are cultivated are the horse plum, a very
pleasant tasted fruit, of large size; the peach plum, red toward the sun,
with an agreeable tartness; the pear plum, so-called from its shape, which
is sweet, and of an excellent taste; the wheat plum, extremely sweet,
oval, and furrowed in the middle, not large; the green-gage plum, which is
generally preferred before all the rest.”
“The Gage family, in the last century, procured from the monastery of
the Chartreuse at Paris, a collection of fruit trees. When these trees
arrived at the Mansion of Hengrave Hall, the tickets were safely affixed to
all of them, excepting only to the Reine Claude, which had either not been
put on, or had been rubbed off in the package. The gardener, therefore,
being ignorant of the name, called it, when it first bore fruit, the Green
Gage.”
Because of the high esteem in which the plums of this group have
always been held in England the early English colonists probably
brought seeds or plants of the Reine Claudes to America. This
supposition is strengthened by the fact that Prince, in his efforts in
1790 to improve plums, chose the “Green Gage,” planting the pits of
twenty-five quarts of plums of this variety. McMahon, in his list of
thirty varieties of plums, published in 1806, gives the names of at
least seven varieties belonging to this group. The varieties of the
group first came into America, without doubt, under one of the
Green Gage names, but afterwards, probably in the early part of the
Nineteenth Century, importations from France brought several
varieties under Reine Claude names though the identity of the plums
under the two names seems to have been recognized in American
pomology from the first.
In appearance the trees of this group are low and the heads well
rounded. The bark is dark in color and cracks rather deeply. The
shoots are thick and do not lose their pubescence. The leaves are
large, broad, more or less wrinkled, coarsely crenate and sometimes
doubly serrated, a character not usually found in Domestica plums,
and bear from one to four glands. The fruit is spherical or ovoid,
green or yellow, sometimes with a faint blush, stems short and
pubescent, suture shallow, bloom thin, texture firm, quality of the
best, flesh sweet, tender, juicy, stone free or clinging.
The leading varieties of the Reine Claude plums are: Reine Claude,
Bavay, Spaulding, Yellow Gage, Washington, McLaughlin, Hand,
Peters, Imperial Gage, Jefferson and Bryanston.
The Prunes.—In western America plum-growers usually speak of
any plum that can be cured, without removing the pit, into a firm,
long-keeping product as a prune. Such a classification throws all
plums with a large percentage of solids, especially of sugar, into this
group. But in Europe the term is used to designate a distinct
pomological group.[48] Since we have a number of varieties of plums
long known as prunes and to which no other term can be nearly so
well applied, it seems wise to follow the established European
custom of using the term as a group name as well as for a
commercial product which is made for most part from these plums.
The prune, as an article of commerce, all writers agree, originated
in Hungary in the Sixteenth Century and was at that time a very
important trading commodity with Germany, France and southern
Europe. If, as Koch surmises (see page 17), the prunes originated in
Turkestan or farther east—and the statements of other botanists and
writers tend to show that his view is correct—the spread of the
varieties of this group westward is readily explained. In the
migrations of the Huns, from western Asia to eastern Europe, in the
first thousand years of the Christian era, some Magyar or Hun intent
on cultivating the soil brought with him the prune-making plums
which, finding a congenial home, became the foundation of the
prune industry of Hungary in the Sixteenth Century. In subsequent
commercial intercourse with western Europe the latter region was
enriched by these prune-making plums from Hungary.
In America this group is now by far the most important one
commercially, though prunes were not introduced into this country
until comparatively recent years. The early lists of plums do not
include any of the prunes and even as late as 1806 McMahon only
mentions in the thirty varieties given by him but one, “the Prune
Plum.” William Prince in 1828 speaks only of the “monstrous
prune,”[49] but in such a way as to lead one to believe that neither
it, nor any other prune, was then cultivated in America.[50] In 1831
William Robert Prince in his Pomological Manual describes from this
group only the German Prune and the “Agen Date,” or Agen. Indeed,
it was not until the beginning of the prune industry in California,
about 1870, that the varieties of this group began to be at all
popular though an attempt was made by the United States Patent
Office to start the prune industry on the Atlantic seaboard by the
distribution of cions of two prunes in 1854.[51]
The growth of the prune industry on the Pacific Coast is one of the
most remarkable industrial phenomena of American agriculture.
About 1856, Louis Pellier, a sailor, brought to San Jose, California,
cions of the Agen from Agen, France. Some time afterward a larger
plum, the Pond, was also imported from France, supposedly from
Agen, and to distinguish the two, the first was called Petite Prune,
by which name it is now very commonly known in the far west. The
first cured prunes from this region were exhibited at the California
State Fair in 1863; commercial orchards began to be planted about
1870, and the first shipments of cured prunes were probably made
in 1875.[52] In 1880 the output per annum was about 200,000
pounds; in 1900 the yearly capacity was estimated to be about
130,000,000 pounds, valued by the producers at $450,000.[53]
The typical varieties of this group are the Italian, German, Agen,
Tragedy, Tennant, Sugar, Giant, Pacific and the Ungarish.
The distinguishing characters of the group are to be found in the
fruit, which is usually large, oval, with one side straighter than the
other, usually much compressed with a shallow suture, blue or
purple, with a heavy bloom, flesh greenish-yellow or golden, firm,
quality good, stone free. The trees are various but are usually large,
upright and spreading with elliptical leaves having much pubescence
on the under surface.
The Perdrigon Plums.—The Perdrigons constitute an old but
comparatively unimportant group of plums.[54] The name comes
from an old time geographical division of Italy.[55] The Perdrigon
plums, especially the varieties having this name, have been grown
extensively for two centuries about Brignoles, France, where they
are cured and sold as Brignoles prunes. Since they are much grown
in what was formerly the province of Touraine, France, they are
sometimes called Touraine plums. The early pomological writers, as
the Princes, Kenrick, Coxe, and even Downing, described White,
Red, Violet, Early and Norman Perdrigon plums, but these are not
now listed in either the pomologies or the nurserymen’s catalogs of
this country though the group is represented by Goliath, Late
Orleans and Royal Tours. These plums might almost be included with
the Imperatrice group, differing only in the smaller and rounder
fruits.
The Yellow Egg Plums.[56]—There are but few varieties belonging
to this group, but these are very distinct, and include some of the
largest and handsomest plums. The origin of varieties of this group
can be traced back over three centuries and it is somewhat
remarkable that the size and beauty of the Yellow Egg Plums have
not tempted growers during this time to produce a greater number
of similar varieties. Rea,[57] in 1676, described the Yellow Egg under
“Magnum Bonum or the Dutch Plum” as “a very great oval-formed
yellowish plum, and, according to the name, is good as well as
great.” The Imperial, which afterward became the Red Magnum
Bonum, is mentioned by Parkinson[58] in 1629 as “Large, long,
reddish, waterish and late.” Earlier names in France, how early
cannot be said, were Prune d’Oeuf, yellow, white, red and violet, or
the Mogul with these several colors, and the Imperiale with the three
or four colors. Later the name d’Aubert was applied to the Yellow
Egg. Though this fruit was first known in England as the Imperiall,
and later as the Magnum Bonum, it has been grown for at least two
centuries in that country as the Yellow Egg, and under this name
came to America in the latter part of the Eighteenth Century.
Koch[59] places these plums in the Date-plum family. The varieties of
this group now grown and more or less well-known are Yellow Egg,
Red Magnum Bonum, Golden Drop and Monroe.
The characters which readily distinguish the Yellow Egg group are,
—the large size of the fruit, possibly surpassing all other plums in
size, the long-oval shape, more or less necked, yellow or purple
color and the yellow flesh. The plums are produced on tall, upright-
spreading trees.
The Imperatrice Plums.—This is a poorly defined assemblage of
varieties, of which dark blue color, heavy bloom, medium size and
oval shape are the chief characters. It is impossible to trace the
origin of the group or to refer varieties to it with accuracy. The
Imperatrice, of which Ickworth is an offspring, seems to have been
one of the first of the blue plums to receive general recognition, and
can as well as any other variety give name to the type. This group
contains by far the greatest number of varieties of any of the
divisions as here outlined, chiefly because the color, the size, and the
shape are all popular with growers and consumers. This has not
always been the case, for in the old pomologies, blue plums are
comparatively few in number, Parkinson, for instance, giving in his
list of sixty in 1629 not more than a half-dozen Domesticas that are
blue.
Among the varieties that fall into this group are:—Ickworth,
Diamond, Arch Duke, Monarch, Englebert, Shipper, Arctic, Smith
Orleans and Quackenboss.
About the only characters that will hold for this large and variable
group are those of the fruits as given above, though to these may be
added for most of the varieties included in the division, thick skin
and firm flesh, clinging stones and poor quality. The trees vary much
but are usually hardy, thrifty and productive, making the members of
the group prime favorites with commercial fruit-growers.
The Lombard Plums.—Just as the blue plums have been thrown in
the last named group, so we may roughly classify a number of red or
reddish or mottled varieties in one group. If the oldest name
applicable to this group were given it should be called after the
Diaper plums, well-known and much cultivated French sorts of two
and three centuries ago. Since they are no longer cultivated, and as
the Lombard seems to be a direct offspring of them and is fairly
typical of the division, the name chosen is as applicable as any.
These plums differ but little from those of the preceding group,
except in color and in having a more obovate shape, a more marked
suture, smaller size and possibly even greater hardiness and
productiveness, and if anything, even poorer quality, though to this
last statement there are several marked exceptions. In this group
are no doubt many varieties which are crosses between some of the
old red plums and varieties of the other groups given.
The following sorts may be named as belonging here:—Lombard,
Bradshaw, Victoria, Pond, Duane, Autumn Compote, Belle,
Middleburg and Field.