100% found this document useful (2 votes)
43 views41 pages

Full (Ebook PDF) MATLAB Programming For Engineers 6th Edition PDF All Chapters

MATLAB

Uploaded by

ibtkuscu
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)
43 views41 pages

Full (Ebook PDF) MATLAB Programming For Engineers 6th Edition PDF All Chapters

MATLAB

Uploaded by

ibtkuscu
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/ 41

Download the full version of the ebook now at ebooksecure.

com

(eBook PDF) MATLAB Programming for Engineers


6th Edition

https://ebooksecure.com/product/ebook-pdf-matlab-
programming-for-engineers-6th-edition/

Explore and download more ebook at https://ebooksecure.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

MATLAB Programming for Engineers 6th Edition Stephen J.


Chapman - eBook PDF

https://ebooksecure.com/download/matlab-programming-for-engineers-
ebook-pdf/

ebooksecure.com

MATLAB for Engineers 6th Edition Holly Moore - eBook PDF

https://ebooksecure.com/download/matlab-for-engineers-ebook-pdf/

ebooksecure.com

(eBook PDF) MATLAB for Engineers Global Edition 5th


Edition

https://ebooksecure.com/product/ebook-pdf-matlab-for-engineers-global-
edition-5th-edition/

ebooksecure.com

(eBook PDF) Using MIS 8th Edition by David M. Kroenke

https://ebooksecure.com/product/ebook-pdf-using-mis-8th-edition-by-
david-m-kroenke/

ebooksecure.com
The Art of Public Speaking 13th Edition (eBook PDF)

https://ebooksecure.com/product/the-art-of-public-speaking-13th-
edition-ebook-pdf/

ebooksecure.com

(eBook PDF) Essential Environment: The Science behind the


Stories 5th Edition

https://ebooksecure.com/product/ebook-pdf-essential-environment-the-
science-behind-the-stories-5th-edition/

ebooksecure.com

(eBook PDF) Cheshire, North & Fawcett: Private


International Law 15th Edition

https://ebooksecure.com/product/ebook-pdf-cheshire-north-fawcett-
private-international-law-15th-edition/

ebooksecure.com

(eBook PDF) How Children Develop 6th Edition

https://ebooksecure.com/product/ebook-pdf-how-children-develop-6th-
edition-2/

ebooksecure.com

(eBook PDF) Evidence-Based Geriatric Nursing Protocols for


Best Practice 5th Edition

https://ebooksecure.com/product/ebook-pdf-evidence-based-geriatric-
nursing-protocols-for-best-practice-5th-edition/

ebooksecure.com
Chemistry for Today: General, Organic, and Biochemistry
10th Edition Spencer L. Seager - eBook PDF

https://ebooksecure.com/download/chemistry-for-today-general-organic-
and-biochemistry-ebook-pdf-2/

ebooksecure.com
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface

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 language and provides an
extensive library of predefined functions to make technical programming tasks
easier and more efficient. This extremely wide variety of functions makes it much
easier to solve technical problems in MATLAB than in other languages such as
Fortran or C. This book introduces the MATLAB language as it is implemented in
version R2018a and shows how to use it to solve typical technical problems.
This book teaches MATLAB as a technical programming language, showing
students how to write clean, efficient, and documented programs. It makes no pre-
tense at being a complete description of all of MATLAB’s hundreds of functions.
Instead, it teaches the student how to use MATLAB as a computer language and
how to locate any desired function with MATLAB’s extensive on-line help facilities.
The first eight chapters of the text are designed to serve as the text for an
“Introduction to Programming/Problem Solving” course for freshman engineer-
ing students. This material should fit comfortably into a 9-week, 3-hour-per-week
course. The remaining chapters cover advanced topics such as I/O, object-oriented
programming, and graphical user interfaces (GUIs). These chapters may be covered
in a longer course or used as a reference by engineering students or practicing engi-
neers who use MATLAB as a part of their coursework or employment.

Changes in the Sixth Edition


The sixth edition of this book is specifically devoted to MATLAB R2018a. In
the four years since the last release, there have been many changes in MATLAB.
vii

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
viii | Preface

The most significant of these changes include the introduction of the App
Designer, which includes a whole new paradigm for creating MATLAB apps; a
new family of plotting functions; and strings. There have also been many smaller
improvements throughout the program. The book has been revised to reflect
these changes.
The major changes in this edition of the book include:
■■ An increase in the number of MATLAB applications featured in the chapters,
with more end-of-chapter exercises using them.
■■ More extensive coverage of plots in Chapter 3 and Chapter 8. The discussion

now includes most of the currently recommended plot types in MATLAB.


Older deprecated plot types have been dropped from coverage as the new ones
have been added.
■■ Coverage of the new string data type, along with changes in the support for

character arrays.
■■ Coverage of the time data types: dateTime, duration, and
calendarDuration.
■■ Coverage of table arrays.

■■ A completely rewritten Chapter 14 featuring the new App Designer and class-

based GUIs.
■■ An extra on-line Chapter 15 featuring the older GUIDE-based GUIs; this

chapter can be downloaded from the book’s website.

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 pre-written programs. Programs may be easily written and modified
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
educational use and 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, on-line documenta-
tion 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 7/8/10, Linux, and the Mac. 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.

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface | ix

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 functions
that provide tested and prepackaged solutions to many basic technical 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 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 available to
help solve complex problems in specific areas. For example, a user can buy
standard toolboxes to solve problems in Signal Processing, Control Sys-
tems, Communications, Image Processing, and Neural Networks, among
many others.
4. Device-Independent Plotting
Unlike other computer languages, MATLAB has many integral plotting and
imaging commands. The plots and images can be displayed on any graphi-
cal output device supported by the computer on which MATLAB is running.
This capability makes MATLAB an outstanding tool for visualizing techni-
cal data.
5. Graphical User Interface
MATLAB includes tools that allow a programmer to interactively construct a
GUI for his or her program. With this capability, the programmer can design
sophisticated data analysis programs that can be operated by relatively inex-
perienced users.

Features of This Book


Many features of this book are designed to emphasize the proper way to write reli-
able MATLAB programs. These features should serve a student well as he or she
is first learning MATLAB and should also be useful to the practitioner on the job.
These features include:
1. Emphasis on Top-Down Design Methodology
The book introduces a top-down design methodology in Chapter 4 and
then uses it consistently throughout the rest of the book. This methodology
encourages a student to think about the proper design of a program before
beginning to code. It emphasizes the importance of clearly defining the
problem to be solved and the required inputs and outputs before any other
work is begun. Once the problem is properly defined, the methodology
teaches the student to employ stepwise refinement to break the task down

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
x | Preface

into successively smaller sub-tasks, and to implement the sub-tasks as sepa-


rate subroutines or functions. Finally, it teaches the importance of testing
at all stages of the process, both unit testing of the component routines and
exhaustive testing of the final product.
The formal design process taught by the book may be summarized as
follows:
1. Clearly state the problem that you are trying to solve.
2. Define the inputs required by the program and the outputs to be pro-
duced by the program.
3. Describe the algorithm that you intend to implement in the program.
This step involves top-down design and stepwise decomposition,
using pseudocode or flow charts.
4. Turn the algorithm into MATLAB statements.
5. Test the MATLAB program. This step includes unit testing of specific
functions as well as exhaustive testing of the final program with many
different data sets.
2. Emphasis on Functions
The book emphasizes the use of functions to logically decompose tasks
into smaller subtasks. It teaches the advantages of functions for data hid-
ing. It also emphasizes the importance of unit testing functions before
they are combined into the final program. In addition, the book teaches
about the common mistakes made with functions and how to avoid them.
3. Emphasis on MATLAB Tools
The book teaches the proper use of MATLAB’s built-in tools to make
programming and debugging easier. The tools covered include the Editor/
Debugger, Workspace Browser, Help Browser, and GUI design tools.
4. Good Programming Practice Boxes
These boxes highlight good programming practices when they are intro-
duced for the convenience of the student. In addition, the good programming
practices introduced in a chapter are summarized at the end of the chapter.
An example Good Programming Practice Box is as follows:

Good Programming Practice


Always indent the body of an if construct by two or more spaces to improve the
readability of the code.

5. Programming Pitfalls Boxes


These boxes highlight common errors so that they can be avoided. An
example Programming Pitfalls Box is as follows:

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Preface | xi

Programming Pitfalls
Make sure that your variable names are unique in the first 31 characters. Otherwise,
MATLAB will not be able to tell the difference between them.

6. Emphasis on Data Structures


Chapter 10 contains a detailed discussion of MATLAB data structures,
including sparse arrays, cell arrays, and structure arrays. The proper use
of these data structures is illustrated in the chapters on handle graphics
(Chapter 13) and graphical user interfaces (Chapter 14).
7. Emphasis on Object-Oriented MATLAB
Chapter 12 includes an introduction to object-oriented programming (OOP)
and describes the MATLAB implementation of OOP in detail. This informa-
tion is then applied in the discussion of App Designer GUIs.

Pedagogical Features
The first eight chapters of this book are specifically designed to be used in a fresh-
man “Introduction to Program/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,
Chapter 8 may be omitted, and the remaining material will still teach the fundamen-
tals of programming and using MATLAB to solve problems. This feature should
appeal to harassed engineering educators trying to cram ever more material into a
finite curriculum.
The remaining chapters cover advanced material that will be useful to the
engineer and engineering students as they progress in their careers. This material
includes advanced I/O, object-oriented programming, and the design of GUIs for
programs.
The book includes several features designed to aid student comprehension. A
total of 20 quizzes appear scattered throughout the chapters, with answers to all
questions included in Appendix B. These quizzes can serve as a useful self-test of
comprehension. In addition, there are approximately 230 end-of-chapter exercises.
Answers to all exercises are included in the Instructor’s Solutions Manual. Good
programming practices are highlighted in all chapters with special Good Program-
ming Practice boxes, and common errors are highlighted in Programming Pitfalls
boxes. End-of-chapter materials include Summaries of Good Programming Practice
and Summaries of MATLAB Commands and Functions.
The book is accompanied by an Instructor’s Solutions Manual, which contains
the solutions to all end-of-chapter exercises. The source code for all examples in

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xii | Preface

the book is available from the book’s website at https://login.cengage.com, and the
source code for all solutions in the Instructor’s Manual is available separately to
instructors.

A Final Note to the User


No matter how hard I try to proofread a document like this book, it is inevitable 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, and I will do my best to
get these errors 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 book’s website,
which is available through https://login.cengage.com. Please check that site for any
updates and/or corrections.

Acknowledgments
I would like to thank all my friends at Cengage Learning for the support they have
given me in getting this book to market.
In addition, I would like to thank my wife Rosa, and our children Avi, David,
Rachel, Aaron, Sarah, Naomi, Shira, and Devorah for their help and encouragement.

Stephen J. Chapman
Melbourne, Australia

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Digital Resources

New Digital Solution for Your Engineering Classroom


WebAssign is a powerful digital solution designed by educators to enrich the engi-
neering teaching and learning experience. With a robust computational engine at
its core, WebAssign provides extensive content, instant assessment, and superior
support.
WebAssign’s powerful question editor allows engineering instructors to cre-
ate their own questions or modify existing questions. Each question can use any
combination of text, mathematical equations and formulas, sound, pictures, video,
and interactive HTML elements. Numbers, words, phrases, graphics, and sound or
video files can be randomized so that each student receives a different version of
the same question.
In addition to common question types such as multiple choice, fill-in-
the-blank, essay, and numerical, you can also incorporate robust answer entry
palettes (­mathPad, chemPad, calcPad, physPad, pencilPad, Graphing Tool) to
input and grade symbolic expressions, equations, matrices, and chemical struc-
tures using powerful computer algebra systems. You can even use ­Camtasia to
embed “clicker” questions that are automatically scored and recorded in the
­GradeBook.

xiii

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xiv | Digital Resources

WebAssign Offers Engineering Instructors the Following


■■ The ability to create and edit algorithmic and numerical exercises.
■■ The opportunity to generate randomized iterations of algorithmic and numeri-
cal exercises. When instructors assign numerical WebAssign homework exer-
cises (­engineering math exercises), the WebAssign program offers them the
ability to generate and assign their students differing versions of the same
engineering math exercise. The computational engine extends beyond and
provides the luxury of solving for correct solutions/answers.
■■ The ability to create and customize numerical questions, allowing students to

enter units, use a specific number of significant digits, use a specific number of
decimal places, respond with a computed answer, or answer within a different
tolerance value than the default.
Visit https://www.webassign.com/instructors/features/ to learn more. To create an account,
instructors can go directly to the signup page at http://www.webassign.net/signup.html.

MindTap Reader
Available via WebAssign and our digital subscription service, Cengage Unlimited,
MindTap Reader is Cengage’s next-generation eBook for engineering students.
The MindTap Reader provides more than just text learning for the student. It
offers a variety of tools to help our future engineers learn chapter concepts in a way
that ­resonates with their workflow and learning styles.
■■ Personalize their ­experience
Within the MindTap Reader, students can h­ ighlight key concepts, add notes, and
bookmark pages. These are collected in My Notes, ensuring they will have their own
study guide when it comes time to study for exams.

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
Digital Resources | xv

■■ Flexibility at their fingertips


With access to Merriam-Webster’s Dictionary and the book’s internal glossary,
students can personalize their study experience by creating and collating their own
custom flashcards. The ReadSpeaker feature reads text aloud to students, so they can
learn on the go—wherever they are.

■■ Review concepts at point of use


Within WebAssign, a “Read It” button at the bottom of each question links students
to corresponding sections of the textbook, enabling access to the MindTap Reader
at the precise moment of learning. A “Watch It” button causes a short video to play.
These videos allow students to better understand and review the problem they need
to complete, enabling support at the precise moment of learning.

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xvi | Digital Resources

The MindTap Mobile App


Available on iOS and Android smartphones, the MindTap Mobile App provides
convenience. Students can access their entire textbook anyplace and anytime. They
can take notes, highlight important passages, and have their text read aloud whether
they are on-line or off.
To download the mobile app, visit https://www.cengage.com/mindtap
/mobileapp.

All-You-Can-Learn Access with Cengage Unlimited


Cengage Unlimited is the first-of-its-kind digital subscription that gives students
total and on-demand access to all the digital learning platforms, eBooks, on-line
homework, and study tools Cengage has to offer—in one place, for one price. With
Cengage ­Unlimited, students get access to their WebAssign courseware, as well as
content in other Cengage platforms and course areas from day one. That’s 70 disci-
plines and 675 courses worth of material, including engineering.
With Cengage Unlimited, students get unlimited access to a library of more than
22,000 products. To learn more, visit https://www.cengage.com/unlimited.

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
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 14
1.3.11 Getting Help 15
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 MATLAB Script Files 23
1.5.1 Setting Up a Problem to Solve 24
1.5.2 Creating a Simple MATLAB Script File 24
1.6 Summary 28
1.6.1 MATLAB Summary 28
1.7 ­­Exercises 29

Chapter 2 MATLAB Basics 33


2.1 Variables and Arrays 33
xvii

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
xviii | Contents

2.2 Creating and Initializing Variables in MATLAB 37


2.2.1 Initializing Variables in Assignment Statements 37
2.2.2 Initializing with Shortcut Expressions 40
2.2.3 Initializing with Built-In Functions 41
2.2.4 Initializing Variables with Keyboard Input 41
2.3 Multidimensional Arrays 43
2.3.1 Storing Multidimensional Arrays in Memory 45
2.3.2 Accessing Multidimensional Arrays with One
Dimension 46
2.4 Subarrays 46
2.4.1 The end Function 47
2.4.2 Using Subarrays on the Left-Hand Side of an Assignment
Statement 47
2.4.3 Assigning a Scalar to a Subarray 49
2.5 Special Values 49
2.6 Displaying Output Data 51
2.6.1 Changing the Default Format 52
2.6.2 The disp Function 53
2.6.3 Formatted Output with the fprintf Function 54
2.7 Data Files 55
2.8 Scalar and Array Operations 58
2.8.1 Scalar Operations 58
2.8.2 Array and Matrix Operations 58
2.9 Hierarchy of Operations 62
2.10 Built-in MATLAB Functions 65
2.10.1 Optional Results 65
2.10.2 Using MATLAB Functions with Array Inputs 65
2.10.3 Common MATLAB Functions 66
2.11 Introduction to Plotting 67
2.11.1 Using Simple xy Plots 68
2.11.2 Printing a Plot 69
2.11.3 Multiple Plots 70
2.11.4 Line Color, Line Style, Marker Style, and Legends 71
2.12 Examples 75
2.13 MATLAB Applications:Vector Mathematics 82
2.13.1 Vector Addition and Subtraction 84
2.13.2 Vector Multiplication 85
2.14 MATLAB Applications: Matrix Operations
and Simultaneous Equations 90
2.14.1 The Matrix Inverse 91
2.15 Debugging MATLAB Programs 92
2.16 Summary 94
2.16.1 Summary of Good Programming Practice 95
2.16.2 MATLAB Summary 96
2.17 Exercises 99

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Contents | xix

Chapter 3 Two-Dimensional Plots 111


3.1 Additional Plotting Features for Two-Dimensional Plots 111
3.1.1 Logarithmic Scales 111
3.1.2 Controlling x- and y-axis Plotting Limits 116
3.1.3 Plotting Multiple Plots on the Same Axes 117
3.1.4 Creating Multiple Figures 117
3.1.5 Subplots 121
3.1.6 Controlling the Spacing between Points on a Plot 122
3.1.7 Enhanced Control of Plotted Lines 126
3.1.8 Enhanced Control of Text Strings 127
3.2 Polar Plots 130
3.3 Annotating and Saving Plots 132
3.4 Additional Types of Two-Dimensional Plots 135
3.5 Using the plot Function with Two-Dimensional Arrays 140
3.6 Plots with Two y Axes 142
3.7 Summary 149
3.7.1 Summary of Good Programming Practice 150
3.7.2 MATLAB Summary 151
3.8 Exercises 151

Chapter 4 Branching Statements and Program Design 157


4.1 Introduction to Top-Down Design Techniques 157
4.2 Use of Pseudocode 161
4.3 The logical Data Type 162
4.3.1 Relational and Logic Operators 162
4.3.2 Relational Operators 163
4.3.3 A Caution About the == and ~= Operators 164
4.3.4 Logic Operators 165
4.3.5 Logical Functions 169
4.4 Branches 171
4.4.1 The if Construct 171
4.4.2 Examples Using if Constructs 173
4.4.3 Notes Concerning the Use of if Constructs 179
4.4.4 The switch Construct 182
4.4.5 The try/catch Construct 183
4.5 More on Debugging MATLAB Programs 189
4.6 Code Sections 196
4.7 MATLAB Applications: Roots of Polynomials 198
4.8 Summary 201
4.8.1 Summary of Good Programming Practice 201
4.8.2 MATLAB Summary 202
4.9 Exercises 203

Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. WCN 02-200-203
Copyright 2020 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part. Due to electronic rights, some third party content may be suppressed from the eBook and/or eChapter(s).
Editorial review has deemed that any suppressed content does not materially affect the overall learning experience. Cengage Learning reserves the right to remove additional content at any time if subsequent rights restrictions require it.
Exploring the Variety of Random
Documents with Different Content
prejudices, have made strong demands upon the peculiar institutions
of the State, and their demands have not been unheeded. It could not
be expected that German rationalists, who could scarcely speak
English well enough to carry on the most ordinary traffic, would
understand, or care to understand, those institutions of the State
which characterized the State as a Christian commonwealth.
Nor did legislators, politicians, editors or preachers consider the
moral forces they were starting and fostering for evil, and the subtle
agencies that would work with all deceivableness of unrighteousness
in them that perish, and whose coming was after the manner of
Satan, with all power, and signs, and lying wonders, deceiving the
very elect, and spending its force and fury upon the desecrated altars
and martyred ministers of Christianity.
Other and different agencies were at work, and had been for years,
which could not be reached or affected by State legislation, and
which contributed no little to that state of the public mind which put
the institutions and ministers of Christianity under disability—what
was commonly denominated “Spiritualism.” It existed in a multitude
of forms, had many names, and manifested itself in many strange
phenomena. Professing to hold communication with the spirit world
and receive intelligence from departed spirits, it appealed strongly to
the curious, the credulous and the superstitious.
Those who believed in the supernatural, or whose hearts of grief
kept them near the “region and shadow of death,” or whose caste of
temperament made them super-sentimental, or who, by some
constitutional or cultivated peculiarity, easily take up with every wild
fancy and foolish vagary that produces a new and novel sensation;
and many others, too, who had credit for intelligence, refinement
and piety—and as for that, some of the most gifted minds of the State
—were led away by it, and became its deceived disciples, in one form
or another, without suspecting its deceitful moral tendencies.
Lecturers came into the cities and traversed the State, circles were
formed, mediums constituted, spirits rapped and wrote, tables
moved and turned, and men, women and children forgot their meals,
and stood in superstitious awe within the enchanted circles.
Thousands of people lost their relish for the Word of God and
forsook his altars of worship. Men neglected their fields, women
their homes and children their schools, and for whole days and
nights hung with bated breath upon the supposed communications
from departed spirits, made often through the most ignorant
mediums. Not only in the cities full, but throughout the vast
populations of the rural districts, all classes seemed more or less
affected by and interested in it. In thousands of homes in Missouri
the midnight lamp shone upon tables surrounded by groups and
circles of people so intent upon the unintelligible incantations and
messages of spiritualism, so-called, that sleep was banished from
swollen eyes and pillows brought no rest to aching heads. By it many
were disqualified alike for secular, domestic and religious duties.
A peculiarity of spiritualism was that night and darkness were
necessary to evoke the spirits. They would rarely communicate to
mortals in the day time, or perform any very remarkable feats, such
as playing on musical instruments, untying mediums, singing in the
air, etc., except in total darkness. Evil spirits, like evil men, “love
darkness rather than light, because their deeds are evil.”
This modern spiritualism—neither the history nor philosophy of
which it is necessary here to discuss—organized itself into bands,
circles and societies of men and women in the larger cities, had their
places of secret nocturnal meetings, rented halls for public Sabbath
exercises, had their rituals and creeds, their priests and prophets,
their altars, incantations and genuflexions, which answered to some
sort of public worship. The first female lecturers and public speakers
were spiritualists, and in the spiritualists’ church, so-called, women
are the high priests and the scriptural teachings in regard to the
relation of men and women and their duties in the church are
reversed.
Indeed, to call them a church at all is a misnomer, and a shameful
reflection upon every idea, principle and function of a true church of
Jesus Christ, for by believing in a revelation direct from departed
spirits in the spirit world they reject God’s revelation.
They commissioned mediums to write, women and men
indiscriminately to preach, to heal the sick, to see through the
material and reveal the spiritual, to break up the marriage relation,
to destroy parental affection, to form new standards of private and
social virtue, to disturb and destroy all the old foundations and
safeguards of society, and reconstruct the social system upon the
modern ideas of socialism and the most offensive forms of free-
loveism.
Religious liberty with them meant social licentiousness, and the
social virtues were sacrificed to the lustful passions.
These things can not all be affirmed of all spiritualists, and yet the
inevitable tendency is the same, and the extremest consequences are
legitimate. To say that thousands of people in Missouri, through the
subtle agencies of spiritualism, renounced their religion, forsook the
church, neglected to read God’s Word, turned themselves away from
paths of piety and works of righteousness to serve tables, and
became downright infidels, is not half of the whole truth. To a large
extent the minds of men became detached from the foundations of
Divine truth, and wandered, like the “unclean spirit, seeking rest and
finding none.”
Systems of infidelity, and infidelity without system, sprang up in
every direction and found supporters amongst those that were least
suspected, and the church began to tremble for the “faith which was
once delivered unto the saints.” Free-thinking, so-called, took the
place of solid, religious faith, and every form of doctrine received
encouragement in the public mind. The tendency in the public mind
to skepticism was never more alarming, and the mystic vagaries of
Andrew Jackson Davis stood in defiant competition with the New
Testament. Lecturers appeared in every city and centre of
population, haranguing the people upon the vain philosophies of
men and questions of science, falsely so-called, seeking to turn away
their ears from the truth unto fables, and “doting about questions
and strifes of words” that would and did disturb the foundations of
godliness. Nor could both the religions press and pulpit countervail
their influence upon the public mind. Infidel clubs and associations
were formed under different disguises, and many mischief-makers
began to believe and teach “unwholesome doctrines” and deceive the
ignorant and unwary. It was a common thing to hear of men
lecturing in the principal towns on spiritualism, a higher civilization,
phrenology, pathology, physiology, hygiene, and other kindred
topics, and selling maps, charts and cheap books. In some places
they drove a brisk trade, and set all the old women—and young ones,
too—men and boys to talking and querying over the new ideas and
theories advanced by these flippant, and often immodest lecturers.
The character of such teachings can not better be illustrated than
by relating a somewhat novel adventure which the author had in the
spring of 1859 with one of these lecturers.
While stationed in Jefferson City I was invited by the Moniteau
County Bible Society to deliver a lecture in California on the Bible
cause, and aid them in raising funds to supply the destitute of the
county with the Word of God. Arriving in California by the afternoon
train I was informed that a gentleman, a stranger, had been there
lecturing for several evenings, and would lecture again that evening,
in a public hall. My informants had not heard him, and could not tell
exactly his subject or his object. When informed that his lectures
were free, and that he was selling some kind of books, I was not long
at a loss to reckon his moral latitude and longitude, and, indeed, to
“guess” whence he came, and what he came for, and hoped that some
lucky chance would throw us together.
The meeting of the Bible Society that night was quite a success, but
my anxiety to see the lecturer seemed fated to disappointment. The
next morning, in company with a friend, I went to the hotel, near the
depot, to await the arrival of the down train. A goodly number of
gentlemen sat and stood about in the public room awaiting the train
also. My friend soon opened the way (as he knew many of them) for
an appeal to them for contributions to the Bible cause, to which they
pretty generally declined to respond. About this time a rather queer
looking genius entered the hotel from the street, hastily and
boisterously relieving himself at once of what seemed to be a meal
sack half filled with books, and several rather pert exclamations and
general salutations, taking a seat near me. I did not at first suspect
his identity, but his inveterate loquacity brought him into notice, and
my eye soon measured a small, thin-visaged, sharp-nosed, squint-
eyed, thin-lipped, cadaverous, nervous specimen of humanity, a
stranger to every sense of modesty, propriety and decency, and who
believed that with himself all wisdom would die. He soon learned
that I lived in Jefferson City, and the following conversation
occurred. Turning to me, whom he had evidently been regarding for
some time with uncivil curiosity, he said:
“You live in Jefferson City?”
“Yes, sir.”
“On your way home now?”
“Yes, sir.”
“Will you be good enough to make an announcement for me to
lecture in your city next week?”
“Well, I don’t know. Our people are not good lecture-goers.”
“Why, don’t you think I can have a good house?”
“That depends upon circumstances.”
“What circumstances? My object is to do good.”
“What subject do you propose to lecture on?” I asked.
“Various subjects; but especially treating of the construction and
functions of the human body, the laws of physiology and hygiene.”
“You may possibly do some good by lecturing on such subjects,”
said I, “and as we both are trying to do good, but in different ways,
possibly if you will help me I may be able to help you.”
By this time, of course, we had the eager attention of all present.
“How can I help you?” he inquired.
“I am trying,” I replied, “to raise money to supply the destitute of
this county with the Bible, and as I have applied to all of these
gentlemen for help, perhaps you would give me something.”
“No, indeed,” said he, with emphasis, “I would rather give my
money to have all the Bibles in the county burned up.”
“You don’t believe much in the Bible, then?”
“Not a bit of it,” he replied. “It has deceived the people long
enough already. If the people would only read my books on
physiology and hygiene, and learn something of the nature and laws
of their own physical organization, and what will promote the health,
growth and action of all its parts, and let that ‘old fable’ alone, they
would be healthier, happier and better off every way.”
He said this with an air of assurance and authority which he
evidently thought and desired would settle the matter with me, at
least for the present, as he rose and walked the room nervously.
But I had seen too many men in the West to be bluffed off after
that style, and my interest in him was too intense.
“Well, my friend,” I said, after he subsided a little, “If you do not
believe the Bible, what do you believe?”
“I am a free-thinker, sir.”
“And what is a free-thinker?”
“One who thinks freely, and as he pleases, upon all subjects,
without the shackles and ‘leading strings’ of the Bible, or any other
old book—who has the independence and manliness to think for
himself.”
“I have long desired to see a free-thinker,” said I, rather coolly.
“Look at me, then, and you will see one,” he replied, rather curtly.
“Will you be kind enough,” I asked, “to tell me what you think,
‘freely,’ upon some subjects of grave importance of which the Bible
treats?”
“What subjects?”
“The origin of man, for instance. If you reject revelation, how do
you account for the origin of our race?”
“Easy enough;” he replied. “In the same way that I account for the
origin of plants and animals by growth and development.”
“You believe, then, in what is called the ‘development theory?’”
“I do, most fully and freely.”
“From what is man a development?” I asked.
“From the lower animals, and immediately from the animals
whose organism is nearest like ours.”
“What animal,” I asked, “do you think furnishes the resemblance
so striking that leads you to believe that man is a development from
it, and an improvement on it?”
With evident embarrassment, he answered, “I suppose the ape or
the monkey.”
“Then,” said I, “I think I can have you a fine audience in Jefferson
City next week, if I can make the announcement according to your
theory.”
“How is that?” he inquired.
“I will tell the people that an improved monkey will lecture to
them.”
The excitement of the man was scarcely less than the evident
pleasure of the listeners.
“And, moreover,” I continued, “I will readily excuse you for not
giving me anything for the Bible cause, and can no longer be
surprised that you desire to see all the Bibles destroyed.”
“Why?” he asked, turning upon me sharply.
“Because,” said I, “I can not expect a monkey, however developed
and improved, to appreciate a revelation from God.”
He became furious, sprang to his feet, and with gesticulations as
rapid and violent as the volubility of his tongue, and as threatening
as the intensity of the mingled chagrin and anger that burned in his
countenance, delivered himself somewhat as follows:
“You are a Methodist preacher, going about trying to make the
people believe that they can get religion—that God can convert them.
It is all a deception—a delusion. God can do no such thing. I was
deceived once, too, and was fool enough to join the Methodist church
and believe that God could convert me. I went to the mourners’
bench, where you try to get people to go; they sang, and prayed and
shouted over me, and beat me on the back, and tried to make me
believe that I was converted. But it was no such thing. God could not
convert me. How could he get into me? Where would he come in at?
At the mouth? or nose? or ears? All the men in the world could not
make me believe that I could be converted. God ’lmighty could not
convert me.”
He closed, pretty well exhausted, and yet with his feelings
somewhat in the ascendant, and with marked interest awaited my
reply.
“I am not at all astonished at the fact,” said I, “that God could not
convert you.”
“Why? Do you not teach the people that God can convert and save
men?”
“Certainly I do. But, then, I read in the Scriptures no provision
whatever for the conversion and salvation of monkeys, however
improved.”
Without another word he wheeled and “went away in a rage,”
snatching up his sack of books in his flight, and muttering something
that could not be heard above the roar of laughter that followed him.
I never saw him afterward. From that moment he went his way, and I
mine. Our paths never crossed each other, or at least we never met.
Our encounter lasted about half an hour, and when he disappeared
so unceremoniously nearly every gentleman present walked up and
gave me a dollar for the Bible cause, as the best way of testifying their
appreciation of the victory.
This aptly illustrates the pernicious character of the teachings then
rife through the State, and this “improved monkey” was a fair
specimen of the class of itinerant lecturers that were then talking to
thousands upon thousands of the people every week.
The rejection of the office of chaplain by the State Legislature, and
the passage of the “Sunday law,” and other class legislation affecting
the religious institutions of the State, meant more than the
temporary freak of a few irreligious politicians. It was the expression
of a wide-spread and growing sentiment amongst the people, and the
first bold demand of a fast-maturing infidelity.
The great Napoleon said that “there are certain moral
combinations always necessary to produce revolution; and if they do
not exist it is impossible to revolutionize a government or interrupt
its peaceful administration. Without them a few ambitious leaders,
inspired by selfish motives, may struggle in vain for political power.”
If civil revolutions attest the wisdom of this remark of the great
military chieftain, much more the moral and religious phases which
revolutions assume under given conditions.
The foreign element, with its rationalism, anti-Sabbatarianism and
abused Romanism; the irreligious element, with its Spiritualism,
Universalism, Free-lovism and open and disguised infidelity—these
furnish to the reflecting “moral combinations” sufficient to produce,
or at least to control and direct, the great moral agencies that were so
efficient during the civil revolution in burning churches, breaking up
religious associations, hunting down and dragging ministers of the
gospel “to prison and to death,” and adding to the horrors of civil
war, this, that the comforting ministrations of Christianity are
proscribed, or altogether prohibited, under the penalty of
imprisonment or death, or both imprisonment and death, to the man
of God whose enlightened conscience teaches him to fear God rather
than man.
CHAPTER III.

Characteristics of the Population—All Nationalities and all Social


Peculiarities Fused into a Common Mass—Missourian—First
Settlers of the State—Where From, and their Type of Domestic
and Social Life—The “Kansas-Nebraska Bill”—Its Effect upon the
Population of Missouri—“Emigration Aid Societies”—Extremes
Brought Together in Missouri—Reflex Tides of Population—
Rapid Increase—Unique Social Formation—Social Peculiarities
Fuse—Religious Characteristics Become more Distinct—
Religious Thought and Feeling, Doctrines and Dogmas, Sharply
Defined and Fearfully Distinct in Missouri—Sects and their
Peculiarities—Sectarian Strife Uncompromising—Why—
Religious Controversy—Published Debates—Their Effect—
Sectarian Bigotry and Intolerance—Differences, Essential and
Non-essential—History Repeating Itself—Persecution the Same
in Every Age—Early Martyrs and the Missouri Martyrs—“The
Altar, the Wood and the Lamb for a Burnt Offering.”

The population of Missouri differs in some respects from that of


any other State. There is a greater variety of nationalities blended, of
blood mingled, and of national, political, social, domestic and
religious characteristics crossed and intermixed than can be found in
any other State.
Other States may have more nationalities represented in their
population, and the political, social and ecclesiastical characteristics
may be more sharply defined; but that fact only confirms the position
taken—that in Missouri these characteristics lose their identity, to a
greater or less extent, and become fused in the common mass. Nearly
all the nationalities of Europe, and many of Asia, are represented in
Missouri, but only a few years’ residence is sufficient to either
destroy or modify their national characteristics.
The social and domestic peculiarities of every State in the Union,
with many foreign states, are exotics here; while many of them die
out altogether and are abandoned, others compromise and
intermingle, until the type of social and domestic life is somewhat of
a hybrid, and is peculiarly Missourian.
The bulk of the old population of the State was from Kentucky,
Virginia, Maryland, North Carolina, Tennessee and Ohio, with a
respectable number from Indiana, Illinois and New York. Up to 1855
and ’56 the types of social life existing in these several States were
scarcely disturbed in Missouri. After the passage by Congress of the
somewhat notorious “Kansas-Nebraska bill,” in 1854, and the
organization of these Territories, the population of Missouri
increased rapidly and became of a more general character.
“Emigration aid societies” in New England and the Eastern States
threw into these newly-formed Territories thousands of families who
represented in their social and religious lives the extreme of New
England ideas and New England faith.
Emigration from the Southern Atlantic and Gulf States, whether by
aid societies or otherwise, rushed to these Territories, bringing the
extremest types of Southern life. The middle and Mississippi Valley
States furnished their share, until the swelling population of Kansas
presented a scene of contrasts and conflicts turbulent and exciting
beyond anything before known in the history of territorial
settlement.
It is true that it was the struggle of political parties for dominion,
each seeking to incorporate its peculiar class of ideas and cast of
policy into the corporate structure of the future State by controlling
the Territorial election; yet the effect upon the social and domestic
peculiarities of Missouri, as well as the peculiar institutions of the
State, was marked and decided.
Missouri caught the reflex tide of population, and her fertile soil,
mineral wealth and commercial advantages not only retained this
reflex population, but supplied an effective appeal to thousands more
from all parts of the country—North, East and South—until for a few
years her population increased at the rate of nearly one hundred
thousand per annum. And yet, in her extended area of territory, this
immense influx was scarcely perceptible. Along her rivers and
railroad lines her population thickened, and her great commercial
centres felt the life and power of multiplied agencies and resources.
Either the rapid growth of cities, the stir and excitement of trade,
the strife for fortune and fame, the magical charm of Western life, or
something else peculiar to the climate, the country or the people, all
of these distinct and opposing types of social life, began soon to lose
their “type force” and blend into a conglomerate social mass, with
fewer Northern, Eastern and Southern peculiarities than Western—a
rather unique social formation, which the modern sociologists have
not yet classified.
Few Southern men and Southern families long retained their
purely Southern style of life, and few Eastern or Northern men and
families long retained the social and domestic habits that were
peculiar to the latitude from which they hailed. It is easy to see how
the social life that derives its characteristics from such different and
distant systems would be peculiar in itself and to itself.
People lose their social characteristics much sooner and more
easily than they do their religious peculiarities. The former are based
on education, taste, association and habit, the latter on principles
vital and divine. As every national and social characteristic known to
American society has become mixed and blended in Missouri, so
every shade of religious thought and feeling, every form of religious
doctrine and dogma, together with every type of ecclesiasticism
known to modern American civilization, exists in the hearts and
homes of Missouri—at least to some extent. Nearly every shade of
religious belief has a representative in Missouri, and stands out more
or less distinct upon the moral phases of society.
These do not blend. No moral alchemist can fuse the distinct
religious peculiarities of a people. Men may relinquish their social
and domestic characteristics because they are matters of taste or
convenience; but to give up their distinctive religious characteristics
is considered a sacrifice of principle and conscience.
Men do not struggle long to maintain and propagate that which
was peculiar to their former social life, but will contend forever for
that which is peculiarly distinctive in their religious belief. That
which men hold lightly and esteem of little value to them elsewhere
assumes an importance and a value in the West, and will not be
surrendered tamely. Religious ideas which in Massachusetts and
South Carolina existed in the mind crudely or loosely; exerting no
influence upon the life, would in Missouri take a permanent shape,
seek affinities, and ultimately grow into churches struggling for a
place in the great moral agencies of the State. Men whose religious
habits were scarcely formed, and whose lives had not assumed any
positive ecclesiastical type in the older States, on coming to Missouri
became positive, decided, unequivocal, sectarian partisans, and often
uncharitable bigots. Men who would contend fairly for their
distinctive tenets elsewhere contend fiercely here, and very few live
long in this State without espousing, to some extent, the cause of
some religious sect.
There are causes for this state of things. Society is, to a great
extent, in a formative state. In very few places, if any, has society
settled down into grooves, and channels, and circles, and social and
church castes, as in the older States; and then society exists in a great
variety of unassimilated elements, Northern, Southern, Eastern,
Western; English, French, German, Scotch, Irish, with a hundred
different shades of social and domestic life, which are too distinct to
become homogeneous, and which seek in church creeds and church
associations their social as, well as religious affinities.
The result is that, perhaps, no other State can furnish as great a
variety of distinct sects, or denominations of Christians, with the
religious population so liberally distributed amongst them. There
may be more sects in States that have a much larger population, but
in proportion to the population, no State has a greater variety of
churches which accommodate such a diversity of belief, each of
which has so large a hold upon the public mind.
It would, indeed, be anomalous if all of these sects could exist
together in peace. Missouri can not claim such exceptional
distinction. In, perhaps, no State or country has denominational
contention and strife been more general and uncompromising.
Not willing to accept the standards of doctrine published and
recognized by each church, nor to abide by the verdict of learned
debates upon all questions of difference, ministers and members,
with astonishing freedom and with defiant presumption, enter the
arena of controversy, public and private, with a zeal and a spirit
equally hurtful to Christian charity and the general cause of true
piety. Nothing can awaken a community more generally and excite
the people more intensely than a public debate, formally arranged
and pitched by two noted champions. The notoriety gained by the
antagonistæ outlasts, if it does not outreach, the settlement of
disputed questions. And, then, each man or woman, however old or
young, must become an adept in religious controversy, and convert
every road side, street corner, shop, office, counting room, kitchen
and parlor into a place for petty, spiteful theological disputation.
Instead of edifying one another in love, and deepening the work of
grace in the heart by appropriate religious conversations, they
embitter the sectarian spirit, destroy Christian charity, alienate
personal friendship, a and “dote about questions and strifes of
words, whereof cometh envy, strife, railings, evil surmisings,
perverse disputing of men of corrupt minds, and destitute of the
truth.”
With many, sectarian jealousy is equaled only by sectarian bigotry,
and the great work of soul-saving is made only tributary to
denominational success. Indeed, many go so far as to deny the virtue
of saving grace to all but themselves, and vainly imagine that the
saving virtues of the atonement are transmitted to the hearts of men
only through their church ministrations and distinctive ordinances.
Nothing excites sectarian jealousy more thoroughly than great
religious awakenings and revivals in any given church. It is natural
that the minister of the gospel who, as a human instrument, is very
successful in winning souls to Christ should be “highly esteemed in
love for his work’s sake,” and yet nothing exposes him more to the
unjust criticisms and unchristian detractions of his less successful
brethren in the ministry. Let a revivalist be successful in stirring the
religious life of a whole community and in producing a general
religious awakening, and the ministers and members of other
churches, instead of joining heartily with him in the great work and
laboring together for the general good, will watch with jealous
interest the progress of the work, discuss with uncharitable criticism
its character, and seize the first opportunity to begin a meeting Of
their own, that they may make the religious awakening of the
community inure to their denominational advantage. Should the
revival occur in a small town where the whole population
Christianized could not more than adequately support one healthy
church organization, with one pastor, instead of assimilating all the
religious elements, it would act like a moral solvent, disparting and
isolating each shade of religious belief and thought. “Where two or
three are gathered together” of the same belief they will organize,
send for a pastor and set up for themselves. Thus the little
community becomes divided into little sectarian factions, each to
drag out a half-conscious, miserable, contentious existence, instead
of uniting in one large, healthy, self-sustaining congregation, with all
the benefits and advantages of a first-class minister well supported, a
good church and Sabbath school, with all the regular ministrations of
the gospel.
These things can not be affirmed of all ministers of the gospel, nor
of all churches and communities in Missouri; but the facts are too
common, too prominent and deplorable to be overlooked in any
legitimate search for the animus of sectarianism in Missouri.
Where the differences between denominations are essential they
are agreed upon their differences and live in peace, each pursuing a
distinct line of operations in its own way unmolested, and their lines
rarely, if ever, cross each other. On the other hand, where the
difference is non-essential, they will not agree to disagree, and
wrangling and contention, disputings and debates, mark the conflict.
Where the difference lies in fundamental doctrines, debates are rare
and formal. If the difference lies in ecclesiastical polity, or in forms of
worship, or in sacraments or modes of ordinances, the discussions
are interminable and the petty disputations endless. The nearer
denominations approach each other in all that is essential in
doctrine, worship and works of righteousness, the deeper seated and
more bitter the jealousy and strife between them. Non-fraternization
and non-intercourse are maintained with much punctiliousness
between those Churches which are one in origin, one in doctrine, and
one in all of their essential characteristics, but which have separated
from each other upon questions of ecclesiastical polity, or for some
other like cause.
Judging from the character of the strife between them, their
methods of ecclesiastical warfare, and the downright animosity that
enters into and characterizes these strifes, one would readily suppose
that, according to their own interpretation, their peculiar
commission is to overcome, root out, exterminate and supplant the
church that bears the same “image and superscription.” Particularly
is this true when the essential grounds of difference are political.
For confirmation of this position it is only necessary to refer to the
two Methodist, the two Presbyterian, and recently the two Baptist
Churches of this State, which are divided, not upon doctrines or
ordinances, but upon questions of ecclesiastical polity—whether
ecclesiastical bodies, as such, have the right to legislate upon or
intermeddle with questions that belong to the State, and must be
controlled by the State.
This allusion is sufficient for the present purpose. It only remains
to be noted here how readily ecclesiastical partisans take advantage
of everything in political and civil strife that will confer upon them
power and position. How readily they identify themselves with
dominant parties, if by so doing they can damage their ecclesiastical
opponents and gain position and power for themselves! How heartily
they endorse the policy of the party in power, if by it their own
disability is exchanged for temporary enfranchisement, and their
own minority is invested with temporary power to oppress and
persecute the hated majority!
History repeats itself; and the genius of religious persecution and
proscription has discovered very few new expedients and adopted
very few new instruments since the days of the Master. The manger
of Bethlehem cradled the Incarnate Innocence, and Pilate’s judgment
hall gave birth to the diabolical genius of persecution, which was
equal to the task, in that it did there and then invent and employ the
only expedient that could at once be successful in the crucifixion of
Incarnate Innocence, and in transmitting itself to every country and
age with undiminished efficiency to pursue to prison and to death
the followers of its first and greatest Victim as long as time should
last. The cry of disloyalty and treason made by ecclesiastics is now, as
it always has been, the strongest appeal to the guardians and
defenders of the State; and as that was successful before Pilate, and
forced him to sign the death warrant of the Master, so it has been
successful in every tribunal of earthly power, and procured the death
warrant of all the martyrs in every country and age, and under every
form of government and every phase of ecclesiasticism from that day
to this. “We found this fellow perverting the nation, forbidding to
give tribute to Cæsar, saying that he himself is Christ—a king.” “If
thou let this man go thou art not Cæsar’s friend; whosoever maketh
himself a king speaketh against Cæsar.” Such declarations made by
the High Priests of the Church could, and did, influence the Roman
Procurator against the convictions of his better judgment, against
reason, against all the facts, again right and against innocence. What
were all these to the life blood of their victim?
In some form or other these charges have been repeated in every
systematic persecution of ministers of the gospel and martyrs for the
truth, from Stephen, Antipas, Polycarp and Barnabas to the
Bartholomew Massacre in Paris, and from the revocation of the Edict
of Nantes and the Papal Inquisition to the last great tragedy in the
drama, occurring during and since the late civil war in America, in
free Missouri and under the ægis of institutions that boast of
religious liberty, and the sanction of men who profess to represent
the advanced Christian civilization of the age.
But, then, “the disciple is not above his Master, nor the servant
above his Lord.” “Remember the word that I said unto you, The
disciple is not above his Lord. If they have persecuted me they will
persecute you.”
They beheaded John, crucified Christ, stoned Stephen, murdered
Paul, “and others had trial of cruel mockings and scourgings, yea,
moreover, of bonds and imprisonment; they were stoned, they were
sawn asunder, were slain with the sword; they wandered about in
sheep-skins and goat-skins, being destitute, afflicted, tormented; of
whom the world was not worthy.”
Every age and country have reproduced in some form the altar and
the victim, the persecutor and the persecuted, the Caiaphas and the
Christ, without material alteration in the charge or the trial. Missouri
has provided the altar, the wood, the fire and the sacrifice for the
offering demanded by this age and country in the interest of the
Church. Woods, Sexton, Glanville, Wollard, Robinson, Wood,
Headlee and others supplied the sacrifice.
While this chapter prepares the way, in an important sense, for the
better understanding of the subject in hand, it will also embody a
standing declaration and testimony against the peculiar spirit and
character of sectarian strife in Missouri.
CHAPTER IV.

Division of the Church in 1844—Slavery only the Occasion—Action


of the General Conference in 1836—Slavery in the Church in 1796
and in 1836—No Change of its Moral Aspects in 1844—Facts
Perverted—Constitutional Powers of the Church—Bishop
Andrew, a Scapegoat—Protest of the Southern Conferences—
Resolution and Plan of Separation—Dr. Elliott and Schism—The
Vote—The Question in the South—Louisville Convention in 1845
—Division—The Bishops of the M. E. Church Accept the Division
the following July—Failure to Change the Sixth Restrictive Rule
—General Conference of 1848 Pronounce the Whole Proceedings
Null and Void—Dr. Lovick Pierce Rejected—Fraternization
Denied—Responsibility of Non-Fraternization—Northern Church
Refuse to Make any Division of Property—Appeal to the Civil
Courts—Decision of the United States Circuit Court for the
Southern District of New York—Justice McLean—United States
Circuit Court for the Southern District of Ohio—Judge Leavitt’s
Decision—Supreme Court of the United States—Points Decided—
The Decision of the Supreme Court in Full.

It is due to the uninformed that a true statement be made here of


the causes, conditions, plan and immediate results of the great
division, in 1844, of the Methodist Episcopal Church in the United
States. This is made the more necessary by the misrepresentation of
the facts made by the press and pulpit of the Northern wing of the
Church, and the political and other uses a perversion of the facts was
made to subserve in Missouri.
1. Slavery was not, in any proper sense, the cause of division, but
was made, incidentally, the occasion only. American slavery had
existed in the Church for sixty years in the same form, and under the
same civil and religious sanctions that authorized and covered it in
1844. If it was the “sum of all evils” in 1844, it was the same in 1796;
and the moral character of the institution was not changed in 1836,
when the General Conference in Cincinnati, by a vote of 120 to 14,
adopted the following preamble and resolutions:
“Whereas, Great excitement has prevailed in this country on the
subject of modern abolitionism, which is reported to have been
increased in this city recently by the unjustifiable conduct of two
members of the General Conference, in lecturing upon and in favor
of that agitating subject; and, whereas, such a course on the part of
any of its members is calculated to bring upon this body the
suspicions and distrust of the community, and to misrepresent its
sentiments in regard to the points at issue; and, whereas, in this
aspect of the case, a duo regard for its own character, as well as a just
concern for the interests of the Church confided to its care, demand a
full, decided and unequivocal expression of the ideas of the General
Conference in the premises; therefore,
“Resolved, By the delegates of the Annual Conferences in General
Conference assembled, that they disapprove, in the most unqualified
sense, the conduct of two members of the General Conference, who
are reported to have lectured in this city recently upon and in favor
of modern abolitionism.
“Resolved, That they are decidedly opposed to modern
abolitionism, and wholly disdain any right, wish or intention to
interfere in the civil and political relation between master and slave
as it exists in the slaveholding States of this Union.”—Bangs’ History
of the Methodist Episcopal Church, vol. 4, pp. 245, 246.
This is rather strong language, but not more so than the pastoral
address issued by the same General Conference. In that address the
following language is used: “It can not be unknown to you that the
question of slavery in these United States, by the constitutional
compact which binds us together as a nation, is left to be regulated
by the several State legislatures themselves, and thereby is put
beyond the control of the general government as well as that of all
ecclesiastical bodies, it being manifest that in the slaveholding States
themselves the entire responsibility of its existence or non-existence
rests with those State legislatures; and such is the aspect of affairs in
reference to this question that whatever else might tend to
ameliorate the condition of the slave, it is evident to us, from what
we have witnessed of abolition movements, that these are the least
likely to do him good.” Reasons are given amply sufficient to prove
that abolition speeches and publications all “tend injuriously to affect
his temporal and spiritual condition, by hedging up the way of the
missionary who is sent to preach to him Jesus and the resurrection,
and thereby abridging his civil and religious privileges.”
“These facts,” the address continues, “which are only mentioned
here as reasons for the friendly admonition which we wish to give
you, constrain us, as your pastors, who are called to watch over your
souls, as they who must give an account, to exhort you to abstain
from all abolition movements and associations, and to refrain from
patronizing any of their publications, and especially from those of
that inflammatory character which denounce in unmeasured terms
those of the brethren who take the liberty to dissent from
them.” * * * * “From every view of the subject which we have been
able to take, and from the most calm and dispassionate survey of the
whole ground, we have come to the solemn conviction that the only
safe, scriptural and prudent way for us, both as ministers and
people, to take, is wholly to refrain from this agitating subject which
is now convulsing the country, and consequently the Church, from
end to end, by calling forth inflammatory speeches, papers and
pamphlets. While we cheerfully accord to such all the sincerity they
ask for their belief and motives, we can not but disapprove of their
measures as alike destructive to the peace of the Church and the
happiness of the slave.”—Bangs’ History of the M. E. Church, vol. 4,
pp. 258, 260.
It is patent to every candid observer that the Church in 1836 did
not consider the subject of slavery as the “sum of all evils,” and
therefore to be extirpated at whatever cost to Church and State, but
rather that the danger to the peace of the Church and country was
not in slavery itself, but in the “abolition movements,” “speeches and
papers” that were “convulsing the country and Church from end to
end,” and “that the only safe, scriptural and prudent way for both
ministers and people was wholly to refrain from this agitating
subject.” Slavery was, according to this address, “beyond the control
of all ecclesiastical bodies,” and it would have been fortunate for the
peace and welfare of both the Church and the country had it
remained beyond their control, and had the teachings and
deliverances of all ecclesiastical bodies upon this subject remained
just as this General Conference expressed it in 1836. Slavery
remained unchanged; and if it was “safe, scriptural and prudent” for
the Church in ’36 to let it alone, and leave it under the “control of the
State legislatures,” where “the constitutional compact which binds us
together as a nation placed it,” why was it not “safe, scriptural and
prudent” to do the same in ’44? Did slavery, as a domestic, moral or
civil institution present any new aspects in 1844? What civil or moral
questions were applicable to slavery in 1844 that did not equally
apply in 1836 or 1796? Had slavery just been admitted into the
Church for the first time, then those who contend that it was the
cause of division would have some show of reason. If slavery was the
“sum of all villainy” in 1844 it was in 1798, unless time can change
the character of “villainy,” for it did not change the character of
slavery. If a slaveholder was “a thief, a robber, a murderer and a
sinner above all others” in 1844, he was the same in 1836. Nathan
Bangs, George Peck, Charles Elliott, Orange Scott, and many others
were members of the General Conference of 1836, but they did not
discover such mighty man-defrauding, God-defying wrongs in
slavery and slaveholders then. Their optics were different when, in
1844, the effort to make the institution of slavery a proper subject for
ecclesiastical legislation, by deposing Bishop James O. Andrew from
the Episcopal office because his wife had inherited slaves, revealed
the dangerous advances the Church had made toward the control of
civil questions.
In this case “certain constructions of the constitutional powers and
prerogatives of the General Conference were assumed and acted on,
which were oppressive and destructive of the rights of the numerical
minority represented in that highest judicatory of the Church.” It was
upon the “construction of the constitutional powers of the church”
that they differed, and in the discussions and decisions that followed
“certain principles were developed in relation to the political aspects
of slavery, involving the right of ecclesiastical bodies to handle and
determine matters lying wholly outside of their proper jurisdiction.”
No candid man who will study the philosophy of that memorable
Conference in the light of the plain facts can believe that slavery was
more than the occasion for the separation.

You might also like