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

MATLAB for Engineering Applications, 5e ISE 5th/ISE Edition William J. Palm Iii - eBook PDF download

The document provides information about the 5th edition of 'MATLAB for Engineering Applications' by William J. Palm III, including download links for the eBook and related texts. It outlines the structure of the book, which covers various MATLAB functionalities and applications in engineering. The author, an experienced professor, emphasizes MATLAB's importance in engineering education and its user-friendly interface for computational tasks.

Uploaded by

alhajheelaac
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)
24 views

MATLAB for Engineering Applications, 5e ISE 5th/ISE Edition William J. Palm Iii - eBook PDF download

The document provides information about the 5th edition of 'MATLAB for Engineering Applications' by William J. Palm III, including download links for the eBook and related texts. It outlines the structure of the book, which covers various MATLAB functionalities and applications in engineering. The author, an experienced professor, emphasizes MATLAB's importance in engineering education and its user-friendly interface for computational tasks.

Uploaded by

alhajheelaac
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/ 79

MATLAB for Engineering Applications, 5e ISE

5th/ISE Edition William J. Palm Iii - eBook PDF


download

https://ebookluna.com/download/matlab-for-engineering-
applications-5e-ise-ebook-pdf/

Download full version ebook from https://ebookluna.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookluna.com
to discover even more!

System Dynamics 3rd Edition by William J Palm III (eBook PDF)

https://ebookluna.com/product/system-dynamics-3rd-edition-by-william-j-
palm-iii-ebook-pdf/

System Dynamics 4th Edition William J. Palm - eBook PDF

https://ebookluna.com/download/system-dynamics-4th-edition-ebook-pdf/

(eBook PDF) MATLAB for Engineering Applications 4th Edition

https://ebookluna.com/product/ebook-pdf-matlab-for-engineering-
applications-4th-edition/

ISE Principles of Statistics for Engineers and Scientists (ISE HED IRWIN
INDUSTRIAL ENGINEERING) 2nd Edition William Navidi Prof. - eBook PDF

https://ebookluna.com/download/ise-principles-of-statistics-for-engineers-
and-scientists-ise-hed-irwin-industrial-engineering-ebook-pdf/
Engineering Mathematics for Semesters III and IV - eBook PDF

https://ebookluna.com/download/engineering-mathematics-for-semesters-iii-
and-iv-ebook-pdf/

(eBook PDF) System Dynamics 4th Edition By William Palm

https://ebookluna.com/product/ebook-pdf-system-dynamics-4th-edition-by-
william-palm/

(eBook PDF) MATLAB An Introduction with Applications 5th Edition

https://ebookluna.com/product/ebook-pdf-matlab-an-introduction-with-
applications-5th-edition/

MATLAB Programming for Engineers 6th Edition Stephen J. Chapman - eBook PDF

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

Oil Palm Biomass for Composite Panels: Fundamentals, Processing, and


Applications 1st edition - eBook PDF

https://ebookluna.com/download/oil-palm-biomass-for-composite-panels-
fundamentals-processing-and-applications-ebook-pdf/
MATLAB® for
page i
Engineering
Applications

William J. Palm III


University of Rhode Island
page ii

MATLAB® FOR ENGINEERING APPLICATIONS

Published by McGraw Hill LLC, 1325 Avenue of the Americas, New York,
NY 10019. Copyright ©2023 by McGraw Hill LLC. All rights reserved.
Printed in the United States of America. No part of this publication may be
reproduced or distributed in any form or by any means, or stored in a
database or retrieval system, without the prior written consent of McGraw
Hill LLC, including, but not limited to, in any network or other electronic
storage or transmission, or broadcast for distance learning.

Some ancillaries, including electronic and print components, may not be


available to customers outside the United States.

This book is printed on acid-free paper.

1 2 3 4 5 6 7 8 9 LCR 27 26 25 24 23 22

ISBN 978-1-265-13919-3
MHID 1-265-13919-9

Cover Image: ©Getty Images/iStockphoto

All credits appearing on page or at the end of the book are considered to be
an extension of the copyright page.

The Internet addresses listed in the text were accurate at the time of
publication. The inclusion of a website does not indicate an endorsement by
the authors or McGraw Hill LLC, and McGraw Hill LLC does not
guarantee the accuracy of the information presented at these sites.
mheducation.com/highered
To my sisters, Linda and Chris, and to my parents, page iii

Lillian and William


ABOUT THE AUTHOR page iv

William J. Palm III is Emeritus Professor of Mechanical Engineering at


the University of Rhode Island. In 1966 he received a B.S. from Loyola
College in Baltimore, and in 1971 a Ph.D. in Mechanical Engineering and
Astronautical Sciences from Northwestern University in Evanston, Illinois.
During his 44 years as a faculty member, he taught 19 courses. One of
these is a freshman MATLAB course, which he helped develop. He has
authored eight textbooks dealing with modeling and simulation, system
dynamics, control systems, and MATLAB. These include System Dynamics,
4th ed. (McGraw Hill, 2021). He wrote a chapter on control systems in the
Mechanical Engineers’ Handbook, 3rd ed. (M. Kutz, ed., Wiley, 2016), and
was a special contributor to the fifth editions of Statics and Dynamics, both
by J. L. Meriam and L. G. Kraige (Wiley, 2002).
Professor Palm’s research and industrial experience are in control
systems, robotics, vibrations, and system modeling. He was the Director of
the Robotics Research Center at the University of Rhode Island from 1985
to 1993, and is the coholder of a patent for a robot hand. He served as
Acting Department Chair from 2002 to 2003. His industrial experience is in
automated manufacturing; modeling and simulation of naval systems,
including underwater vehicles and tracking systems; and design of control
systems for underwater-vehicle engine-test facilities.
CONTENTS page v

Numbered Examples vii


Preface ix

CHAPTER 1
An Overview of MATLAB® 3
1.1 MATLAB Interactive Sessions 4
1.2 The Toolstrip 17
1.3 Built-In Functions, Arrays, and Plots 18
1.4 Working with Files 24
1.5 The MATLAB Help System 32
1.6 Problem-Solving Methodologies 35
1.7 Summary 42
Problems 43

CHAPTER 2
Numeric, Cell, and Structure Arrays 51
2.1 One- and Two-Dimensional Numeric Arrays 52
2.2 Multidimensional Numeric Arrays 61
2.3 Element-by-Element Operations 62
2.4 Matrix Operations 72
2.5 Polynomial Operations Using Arrays 91
2.6 Cell Arrays 96
2.7 Structure Arrays 98
2.8 Summary 102
Problems 103

CHAPTER 3
Functions 121
3.1 Elementary Mathematical Functions 121
3.2 User-Defined Functions 128
3.3 Additional Function Types 143
3.4 File Functions 158
3.5 Summary 160
Problems 161

CHAPTER 4
Programming with MATLAB 169
4.1 Program Design and Development 170
4.2 Relational Operators and Logical Variables 177
4.3 Logical Operators and Functions 179
4.4 Conditional Statements 186
4.5 for Loops 194
4.6 while Loops 206
4.7 The switch Structure 212
4.8 Debugging MATLAB Programs 214
4.9 Additional Examples and Applications 217
4.10 Summary 231
Problems 232

CHAPTER 5
Advanced Plotting 251
5.1 xy Plotting Functions 251
5.2 Additional Commands and Plot Types 261
5.3 Interactive Plotting in MATLAB 278
5.4 Three-Dimensional Plots 280
5.5 Summary 286
Problems 287

CHAPTER 6
Model Building and Regression 299
6.1 Function Discovery 299
6.2 Regression 310
6.3 The Basic Fitting Interface 326
6.4 Summary 329
Problems 330

7
page vi
CHAPTER
Statistics, Probability, and Interpolation 341
7.1 Statistics and Histograms 342
7.2 The Normal Distribution 346
7.3 Random Number Generation 352
7.4 Interpolation 361
7.5 Summary 370
Problems 370

CHAPTER 8
Linear Algebraic Equations 379
8.1 Matrix Methods for Linear Equations 380
8.2 The Left-Division Method 383
8.3 Underdetermined Systems 389
8.4 Overdetermined Systems 398
8.5 A General Solution Program 402
8.6 Summary 404
Problems 405

CHAPTER 9
Numerical Methods for Calculus and Differential Equations
419
9.1 Numerical Integration 420
9.2 Numerical Differentiation 428
9.3 First-Order Differential Equations 431
9.4 Higher-Order Differential Equations 439
9.5 Special Methods for Linear Equations 445
9.6 Summary 458
Problems 459

CHAPTER 10
Simulink 471
10.1 Simulation Diagrams 472
10.2 Introduction to Simulink 473
10.3 Linear State-Variable Models 478
10.4 Piecewise-Linear Models 481
10.5 Transfer-Function Models 487
10.6 Nonlinear State-Variable Models 489
10.7 Subsystems 491
10.8 Dead Time in Models 496
10.9 Simulation of a Nonlinear Vehicle Suspension Model 499
10.10 Control Systems and Hardware-in-the-Loop Testing 503
10.11 Summary 513
Problems 514

CHAPTER 11
Symbolic Processing with MATLAB 525
11.1 Symbolic Expressions and Algebra 527
11.2 Algebraic and Transcendental Equations 536
11.3 Calculus 543
11.4 Differential Equations 555
11.5 Laplace Transforms 562
11.6 Symbolic Linear Algebra 570
11.7 Summary 575
Problems 576

CHAPTER 12
Projects with Matlab 589
12.1 MATLAB Mobile 590
12.2 Programming Game Projects in MATLAB 595
12.3 The MATLAB App Designer 600

APPENDIX A
Guide to Commands and Functions in This Text 603

APPENDIX B
Animation and Sound in MATLAB 615

APPENDIX C
References 626
APPENDIX D
Formatted Output in MATLAB 627
Answers to Selected Problems 631
Index 634
Numbered Examples page vii

Number and Topic


CHAPTER ONE
1.1–1 Volume of a Circular Cylinder
1.6–1 Piston Motion
CHAPTER TWO
2.3–1 Vectors and Displacement
2.3–2 Aortic Pressure Model
2.3–3 Transportation Route Analysis
2.3–4 Current and Power Dissipation in Resistors
2.3–5 A Batch Distillation Process
2.4–1 Miles Traveled
2.4–2 Height versus Velocity
2.4–3 Manufacturing Cost Analysis
2.4–4 Product Cost Analysis
2.4–5 Force Analysis of a 3-Bar Simple Truss
2.4–6 Circuit with Three Resistances
2.4–7 Production Planning
2.4–8 Force Analysis of a Bolt
2.4–9 Computing Forces and Moments on a Tower
2.5–1 Earthquake-Resistant Building Design
2.6–1 An Environment Database
2.7–1 A Student Database
CHAPTER THREE
3.2–1 Minimum Cost Design of a Water Tower
3.2–2 Optimization of an Irrigation Channel
3.3–1 Extra Parameters in fzero and fminbnd
3.3–2 An Intercept Course
3.3–3 Topping the Green Monster
3.3–4 Speed Estimation from Sonar Measurements
3.4–1 Creating a Data File and Loading It into a Variable
CHAPTER FOUR
4.3–1 Height and Speed of a Projectile
4.5–1 Series Calculation with a for Loop
4.5–2 Plotting with a for Loop
4.5–3 Analyzing Trajectories
4.5–4 Motion in One Dimension
4.5–5 Data Sorting
4.6–1 Series Calculation with a while Loop
4.6–2 Growth of a Bank Account
4.6–3 Structural Analysis
4.7–1 Using the switch Structure for Calendar Calculations
4.9–1 A Pursuit Curve
4.9–2 Flight of an Instrumented Rocket
4.9–3 Time to Reach a Specified Height
4.9–4 A College Enrollment Model: Part I
4.9–5 A College Enrollment Model: Part II
CHAPTER FIVE
5.1–1 Plotting Trajectories
5.2–1 Fishing Near an International Boundary
5.2–2 Plotting Orbits
CHAPTER SIX
6.1–1 Speed Estimation from Sonar Measurements
6.1–2 Temperature Dynamics
6.1–3 Hydraulic Resistance
6.1–4 A Cantilever Beam Model
6.2–1 Effect of Polynomial Degree

6.2–2 Estimation of Traffic Flow page viii


6.2–3 Modeling Bacteria Growth
6.2–4 Breaking Strength and Alloy Composition
6.2–5 Response of a Biomedical Instrument
6.2–6 Fitting the Logistic Model
CHAPTER SEVEN
7.1–1 Breaking Strength of Thread
7.2–1 Mean and Standard Deviation of Heights
7.2–2 Estimation of Height Distribution
7.3–1 Statistical Analysis and Manufacturing Tolerances
7.3–2 A Random Walk with Drift
CHAPTER EIGHT
8.1–1 The Matrix Inverse Method
8.2–1 Left-Division Method with Three Unknowns
8.2–2 Calculation of Cable Tension
8.2–3 An Electric Resistance Network
8.2–4 Ethanol Production
8.3–1 An Underdetermined Set with Three Equations and Three
Unknowns
8.3–2 A Statically Indeterminate Problem
8.3–3 Three Equations in Three Unknowns
8.3–4 Production Planning
8.3–5 Traffic Engineering
8.4–1 The Least-Squares Method
8.4–2 An Overdetermined Set
CHAPTER NINE
9.1–1 Velocity from an Accelerometer
9.1–2 Evaluation of Fresnel’s Cosine Integral
9.1–3 Double Integral over a Nonrectangular Region
9.3–1 Response of an RC Circuit
9.3–2 Liquid Height in a Spherical Tank
9.4–1 Pursuit Equations
9.4–2 A Nonlinear Pendulum Model
9.5–1 Trapezoidal Profile for a DC Motor
CHAPTER TEN
10.2–1 Simulink Solution of y ˙ = −10y + f(t)
10.3–1 Simulink Model of a Two-Mass Suspension System
10.4–1 Simulink Model of a Rocket-Propelled Sled
10.4–2 Model of a Relay-Controlled Motor
10.5–1 Response with a Dead Zone
10.6–1 Model of a Nonlinear Pendulum
CHAPTER ELEVEN
11.2–1 Intersection of Two Circles
11.2–2 Positioning a Robot Arm
11.3–1 Topping the Green Monster
PREFACE page ix

F
ormerly used mainly by specialists in signal processing and numerical
analysis, MATLAB® has achieved widespread and enthusiastic
acceptance throughout the engineering community. Many engineering
schools require a course based entirely or in part on MATLAB early in the
curriculum. MATLAB is programmable and has the same logical,
relational, conditional, and loop structures as other programming languages.
Thus it can be used to teach programming principles. In most engineering
schools, MATLAB is the principal computational tool used throughout the
curriculum. In some technical specialties, such as signal processing and
control systems, it is the standard software package for analysis and design.
The popularity of MATLAB is partly due to its long history, and thus it is
well developed and well tested. People trust its answers. Its popularity is
also due to its user interface, which provides an easy-to-use interactive
environment that includes extensive numerical computation and
visualization capabilities. Its compactness is a big advantage. For example,
you can solve a set of many linear algebraic equations with just three lines
of code, a feat that is impossible with traditional programming languages.
MATLAB is also extensible; currently more than 30 “toolboxes” in various
application areas can be used with MATLAB to add new commands and
capabilities.
MATLAB is available for a number of operating systems. It is
compatible across all these platforms, which enables users to share their
programs, insights, and ideas. This text is based on release R2021a of the
software. This includes MATLAB version 9.10. Some of the material in
Chapter 9 is based on the Control System toolbox, Version 10.10. Chapter
10 is based on Version 10.3 of Simulink®, and Chapter 11 is based on
Version 8.7 of the Symbolic Math toolbox.

TEXT OBJECTIVES AND PREREQUISITES


This text is intended as a stand-alone introduction to MATLAB. It can be
used in an introductory course, as a self-study text, or as a supplementary
text. The text’s material is based on the author’s experience in teaching a
required two-credit semester course devoted to MATLAB for engineering
freshmen. In addition, the text can serve as a reference for later use. The
text’s many tables and its referencing system in an appendix have been
designed with this purpose in mind. A secondary objective is to introduce
and reinforce the use of problem-solving methodology as practiced by the
engineering profession in general and as applied to the use of computers to
solve problems in particular. This methodology is introduced in Chapter 1.

The reader is assumed to have some knowledge of algebra and page x


trigonometry; knowledge of calculus is not required for the first eight
chapters. Some knowledge of high school chemistry and physics, primarily
simple electric circuits, and basic statics and dynamics, is required to
understand some of the examples.

TEXT ORGANIZATION
In addition to updating material from the previous edition to include new
features, new functions, and changes in syntax and function names, the text
incorporates the many suggestions made by reviewers and other users.
More examples and homework problems have been added.
The text consists of 12 chapters. The first five chapters constitute a basic
course in MATLAB. The remaining seven chapters are independent of each
other and cover more advanced applications of MATLAB, the Control
Systems toolbox, Simulink, and the Symbolic Math toolbox.
Chapter 1 gives an overview of MATLAB features, including its
windows and menu structures. It also introduces the problem-solving
methodology.
Chapter 2 introduces the concept of an array, which is the fundamental
data element in MATLAB, and describes how to use numeric arrays, cell
arrays, and structure arrays for basic mathematical operations.
Chapter 3 discusses the use of functions and files. MATLAB has an
extensive number of built-in math functions, and users can define their own
functions and save them as a file for reuse.
Chapter 4 introduces programming with MATLAB and covers relational
and logical operators, conditional statements, for and while loops, and the
switch structure.
Chapter 5 deals with two- and three-dimensional plotting. It first
establishes standards for professional-looking, useful plots. In the author’s
experience, beginning students are not aware of these standards, so they are
emphasized. The chapter then covers MATLAB commands for producing
different types of plots and for controlling their appearance. The Live
Editor, which is a major addition to MATLAB, is covered in Section 5.1.
Chapter 6 covers function discovery, which uses data plots to discover a
mathematical description of the data and is a useful tool for model building.
It is a common application of plotting, and a separate section is devoted to
this topic. The chapter also treats polynomial and multiple linear regression
as part of its modeling coverage.
Chapter 7 reviews basic statistics and probability and shows how to use
MATLAB to generate histograms, perform calculations with the normal
distribution, and create random number simulations. The chapter concludes
with linear and cubic spline interpolation.
Chapter 8 covers the solution of linear algebraic equations, which arise in
applications in all fields of engineering. This coverage establishes the
terminology and some important concepts required to use the computer
methods properly. The chapter then shows how to use MATLAB to solve
underdetermined and overdetermined systems of linear equations.

Chapter 9 covers numerical methods for calculus and differential page xi


equations. Numerical integration and differentiation methods are
treated. Ordinary differential equation solvers in the core MATLAB
program are covered, as well as the linear system solvers in the Control
System toolbox. For those readers not familiar with differential equations,
this chapter provides some background for Chapter 10.
Chapter 10 introduces Simulink, which is a graphical interface for
building simulations of dynamic systems. Simulink has increased in
popularity and has seen increased use in industry. The MathWorks provides
Simulink support packages for computer hardware such as LEGO©
MINDSTORMS©, Arduino©, and Raspberry Pi©, which are popular with
researchers and hobbyists for controlling drones and robots. These packages
let you develop and simulate algorithms that run standalone on the
supported hardware. They include a library of Simulink blocks for
configuring and accessing the hardware’s sensors, actuators, and
communication interfaces. You can also tune parameters live from your
Simulink model while your algorithm runs on the hardware. The
MathWorks supports an active user community online where you can see
applications and download files. Chapter 10 discusses some of the robotic
vehicle applications.
Chapter 11 covers symbolic methods for manipulating algebraic
expressions and for solving algebraic and transcendental equations,
calculus, differential equations, and matrix algebra problems. The calculus
applications include integration and differentiation, optimization, Taylor
series, series evaluation, and limits. Laplace transform methods for solving
differential equations are also introduced. This chapter requires the use of
the Symbolic Math toolbox.
Chapter 12 introduces MATLAB Mobile, which is an application
available from The Mathworks that enables you to connect a mobile device
like a smartphone to a MATLAB session running on the MathWorks
Computing Cloud or on your computer. The chapter shows how to use
smartphone sensors, such as an accelerometer, to collect data in the field.
The chapter also contains some suggestions for course projects, based on
the author’s experience in teaching a freshman MATLAB course. The
chapter concludes with a brief introduction to the MATLAB App Designer.
Appendix A contains a guide to the commands and functions introduced
in the text. Appendix B is an introduction to producing animation and sound
with MATLAB. While not essential to learning MATLAB, these features
are helpful for generating student interest. Appendix C is a list of
references. Appendix D summarizes functions for creating formatted
output. Answers to selected problems and an index appear at the end of the
text.
All figures, tables, equations, and exercises have been numbered
according to their chapter and section. For example, Figure 3.4–2 is the
second figure in Chapter 3, Section 4. This system is designed to help the
reader locate these items. The end-of-chapter problems are the exception to
this numbering system. They are numbered 1, 2, 3, and so on to avoid
confusion with the in-chapter exercises.

NEW TO THIS EDITION


As well as updating the coverage to include changes in MATLAB syntax
and MATLAB screens, this edition includes 20 percent more numbered,
major engineering examples. Also, 30 percent of the chapter problems are
new. A new chapter has been added, Chapter 12 Projects with MATLAB,
which introduces MATLAB Mobile and the MATLAB App Designer, and
which covers programming for game projects in MATLAB.

SPECIAL REFERENCE FEATURES page xii

The text has the following special features, which have been designed to
enhance its usefulness as a reference.
■ Throughout each of the chapters, numerous tables summarize the
commands and functions as they are introduced.
■ Appendix A is a complete summary of all the commands and functions
described in the text, grouped by category, along with the number of the
page on which they are described.
■ At the end of the chapter is a list of the key terms introduced in the
chapter, with a reference to where they are introduced.
■ The index has four sections: a listing of MATLAB symbols, an
alphabetical list of MATLAB commands and functions, a list of
Simulink block names, and an alphabetical list of topics.

PEDAGOGICAL AIDS
The following pedagogical aids have been included:
■ Each chapter begins with an overview.
■ Test Your Understanding exercises appear throughout the chapters near
the relevant text. These relatively straightforward exercises allow
readers to assess their grasp of the material as soon as it is covered. In
most cases the answer to the exercise is given with the exercise.
Students should work these exercises as they are encountered.
■ Each chapter ends with numerous problems, grouped according to the
relevant section.
■ Each chapter contains numerous practical examples. The major
examples are numbered.
■ Each chapter has a summary section that reviews the chapter’s
objectives.
■ Answers to many end-of-chapter problems appear at the end of the text.
These problems are denoted by an asterisk next to their number (for
example, 15*).
Two features have been included to motivate the student toward
MATLAB and the engineering profession:
■ Most of the examples and the problems deal with engineering
applications. These are drawn from a variety of engineering fields and
show realistic applications of MATLAB. A guide to these examples
appears on page vii.

■ The facing page of each chapter contains a photograph of a page xiii


recent engineering achievement that illustrates the challenging
and interesting opportunities that await engineers in the 21st century. A
description of the achievement, its related engineering disciplines, and a
discussion of how MATLAB can be applied in those disciplines
accompanies each photo.

ONLINE RESOURCES
An Instructor’s Manual is available online for instructors who have adopted
this text. This manual contains the complete solutions to all of the Test Your
Understanding exercises and to all of the chapter problems. The text
website also has downloadable files containing the major programs and
PowerPoint slides keyed to the text.

MATLAB INFORMATION
For MATLAB and Simulink product information, please contact:

The MathWorks, Inc.


3 Apple Hill Drive
Natick, MA, 01760-2098 USA
Tel: 508-647-7000
Fax: 508-647-7001
E-mail: [email protected]
Web: www.mathworks.com
How to buy: www.mathworks.com/store
ACKNOWLEDGMENTS
Many individuals are due credit for this text. Working with faculty at the
University of Rhode Island in developing and teaching a freshman course
based on MATLAB has greatly influenced this text. Email from many users
contained useful suggestions. The author greatly appreciates their
contributions.
The MathWorks, Inc., has always been very supportive of educational
publishing. I especially want to thank Naomi Fernandes of The MathWorks,
Inc., for her help. Theresa Collins, Maria McGreal, and Beth Bettcher of
McGraw Hill Education and Beth Baugh efficiently handled the manuscript
reviews and guided the text through production.
My sisters, Linda and Chris, have always been there, cheering my efforts.
My parents, Lillian and William, were always there for support before they
passed away. Finally, I want to thank my wife, Mary Louise, and my
children, Aileene, Bill, and Andy, for their understanding and support of
this project over the last 25 years.

William J. Palm III


Kingston, Rhode Island
March 2021

_________
®
MATLAB and Simulink are registered trademarks of The MathWorks, Inc.
page xiv

page xv
page 1
Engineering in the 21st Century. page 2

..
Remote Exploration

Source: NASA

I
t will be many years before humans can travel to other planets. In the
meantime, unmanned probes have been rapidly increasing our knowledge
of the universe. Their use will increase in the future as our technology
develops to make them more reliable and more versatile. Better sensors are
expected for imaging and other data collection. Improved robotic devices
will make these probes more autonomous, and more capable of interacting
with their environment, instead of just observing it.
NASA’s planetary rover Sojourner landed on Mars on July 4, 1997, and
excited people on Earth while they watched it successfully explore the
Martian surface to determine wheel-soil interactions, to analyze rocks and
soil, and to return images of the lander for damage assessment.
Then in early 2004, two improved rovers, Spirit and Opportunity, landed
on opposite sides of the planet. In one of the major discoveries of the 21st
century, they obtained strong evidence that water once existed on Mars in
significant amounts. Although planned to operate for only 90 Martian days,
Spirit operated for seven years. The rover likely lost power due to
excessively cold internal temperatures. Opportunity went inactive in 2018,
having already exceeded its planned operational life by many Earth years.
The rover Curiosity used the innovative “skycrane” to land on Mars in
2012 less than 2.4 km (1.5 mi) from its intended target after a 563,000,000
km (350,000,000 mi) journey. It was designed to investigate the Martian
climate and geology; to assess whether the Gale crater ever had an
environment suitable for microbial life, and to determine the habitability of
the site for future human exploration. Curiosity has a mass of 899 kg (1,982
lb) including 80 kg (180 lb) of instruments. The rover is 2.9 m (9.5 ft) long
by 2.7 m (8.9 ft) wide by 2.2 m (7.2 ft) in height. It discovered unexplained
variations in oxygen and methane, and found remnants of an ancient oasis.
Perseverance is a car-sized rover designed to explore the crater Jezero on
Mars. It was launched in July 2020 and successfully landed in February
2021. Perseverance has a design similar to Curiosity, but also carries the
experimental mini-helicopter Ingenuity that was able to fly in the weak
Martian atmosphere. The rover is intended to seek out evidence of former
microbial life, to collect rock and soil samples to store for retrieval by a
future mission, and to test oxygen production from the Martian atmosphere
in support of future crewed missions.
All engineering disciplines were involved with the rover projects. From
the design of the rocket propulsion of the launch vehicles and the calculation
of the interplanetary trajectories, to the design of the rovers’ systems,
MATLAB was used in many of these applications, and it is well suited to
assist designers of future probes and autonomous vehicles like the Mars
rovers. ■

page 3
CHAPTER
1

An Overview of MATLAB®*
OUTLINE
1.1 MATLAB Interactive Sessions
1.2 The Toolstrip
1.3 Built-In Functions, Arrays, and Plots
1.4 Working with Files
1.5 The MATLAB Help System
1.6 Problem-Solving Methodologies
1.7 Summary
Problems

This chapter covers many of the basic features of MATLAB. After you have
finished this chapter, you will be able to use MATLAB to solve many kinds
of problems. Section 1.1 provides an introduction to MATLAB as an
interactive calculator. Section 1.2 covers the main menus and the Toolstrip.
Section 1.3 introduces built-in functions, arrays, and plots. Section 1.4
discusses how to create, edit, and save MATLAB programs. Section 1.5
introduces the extensive MATLAB Help System and Section 1.6 introduces
the methodology of engineering problem solving, with emphasis on the use
of computers.

How to Use This Book


The book’s chapter organization is flexible enough to accommodate a variety
of users. However, it is important to cover at least the first four chapters, in
that order. Chapter 2 covers arrays, which are the basic building blocks in
MATLAB. Chapter 3 covers file usage, functions built into MATLAB, and
user-defined functions. Chapter 4 covers programming using relational and
logical operators, conditional statements, and loops.

Chapters 5 through 11 are independent chapters. They contain in- page 4


depth discussions of how to use MATLAB to solve several common
types of problems. Chapter 5 covers two- and three-dimensional plots in
greater detail. Chapter 6 shows how to use plots to build mathematical
models from data. Chapter 7 covers probability, statistics, and interpolation
applications. Chapter 8 treats linear algebraic equations in more depth by
developing methods for the overdetermined and underdetermined cases.
Chapter 9 introduces numerical methods for calculus and ordinary
differential equations. Simulink®*, the topic of Chapter 10, is a graphical
user interface for solving differential equation models. Chapter 11 covers
symbolic processing with the MATLAB Symbolic Math toolbox, with
applications to algebra, calculus, differential equations, transforms, and
special functions. Chapter 12 discusses creating course projects using
MATLAB, and it introduces MATLAB Mobile and the App Designer.

Reference and Learning Aids


The book has been designed as a reference as well as a learning tool. The
special features useful for these purposes are as follows.
■ Throughout each chapter margin notes identify where new terms are
introduced.
■ Throughout each chapter short Test Your Understanding exercises
appear. Where appropriate, answers immediately follow the exercise so
you can measure your mastery of the material.
■ Homework exercises are at the end of a chapter. These usually require
greater effort than the Test Your Understanding exercises.
■ Most chapters contain tables summarizing the MATLAB commands
introduced in that chapter.
■ At the end of each chapter is
■ A summary of what you should be able to do after completing that
chapter
■ A list of key terms you should know
■ Appendix A contains tables of MATLAB commands, grouped by
category, with the appropriate page references.
■ The index has four parts: MATLAB symbols, MATLAB commands,
Simulink blocks, and topics.

1.1 MATLAB Interactive Sessions


We now show how to start MATLAB, how to make some basic calculations,
and how to exit MATLAB.

Conventions
In this text we use typewriter font to represent MATLAB commands, any
text that you type in the computer, and any MATLAB responses that appear
on the screen, for example, y = 6*x. Variables in normal mathematics text
appear in italics, for example, y = 6x. We use boldface type for three
purposes: to represent vectors and matrices in normal mathematics text (for
example, Ax = b), to represent an action on the keyboard (for example, press
Enter), and to represent the name of a screen menu or an item a menu when
it is the object of an action (for example, click on File). It is assumed that
you press the Enter key after you type a command. We do not show this
action with a separate symbol.

Starting MATLAB page 5

To start MATLAB on a Windows system, double-click on the MATLAB


icon. You will then see the MATLAB Desktop. The Desktop manages the
Command window and a Help Browser as well as other tools. The Desktop
may appear differently in different versions of MATLAB, but the basic
features should be similar to those discussed here. The default appearance of
the Desktop in MATLAB version R2021a is shown in Figure 1.1–1. Four
windows appear. These are the Command window in the center, the
Workspace window in the right, the Details window in the lower left, and the
Current Folder window in the upper left. Across the top of the Desktop are a
row of menu names and a row of icons called the Toolstrip. The default
Desktop shows three tabs: HOME, PLOT, and APPS. Use of these tabs is
discussed in Section 1.2. To the right of the tabs is a box showing the
Shortcut button that enables you to create easy access to commonly used
procedures. The remaining items in the box are used for more advanced
features and are initially inactive. We will describe the various menus later in
this chapter.

Figure 1.1–1 The default MATLAB Desktop for version R2021a. Source:
MATLAB

DESKTOP

You use the Command window to communicate with the MATLAB


program, by typing instructions of various types called commands, functions,
and statements. Later we will discuss the differences between these types,
but for now, to simplify the discussion, we will call the instructions by the
generic name commands. MATLAB displays the prompt (>>) to indicate that
it is ready to receive instructions. Before you give MATLAB instructions,
make sure the cursor is located just after the prompt. If it is not, use the
mouse to move the cursor. The prompt in the Student Edition looks like
EDU >>. We will use the normal prompt symbol >> to illustrate commands
in this text. The Command window in Figure 1.1–1 shows some commands
and the results of the calculations. We will cover these commands later in
this chapter.
COMMAND WINDOW

Three other windows appear in the default Desktop. The Current page 6
Folder window is much like a file manager window; you can use it to
access files. Double-clicking on a file name with the extension .m will open
that file in the MATLAB Editor. The Editor is discussed in Section 1.4.
Figure 1.1–1 shows the files in the author’s folder Examples.
Underneath the Current Folder window is the Details window. It displays
the first comment (if any) in the file. Note that four file types are shown in
the Current Folder. These in order are a MATLAB script file, a JPEG figure
file, a MATLAB user-defined file, and a Simulink model file. These have the
extensions .m, .jpg, m, and .mdl, respectively. Each file type has its own
icon. We will cover m files in this chapter. The other file types will be
covered in later chapters. You can have other file types in the folder.
The Workspace window appears to the right. The Workspace window
displays the variables created in the Command window. Double-click on a
variable name to open the Variables Editor, which is discussed in Chapter 2.
VARIABLE

You can alter the appearance of the Desktop if you wish. For example, to
eliminate a window, just click on its Close-window button (×) in its upper
right-hand corner. To undock, or separate the window from the Desktop,
click on the button containing a curved arrow. An undocked window can be
moved around on the screen. You can manipulate other windows in the same
way. To restore the default configuration, click on Layout in the toolbar, and
select Default.

Test Your Understanding


T1.1–1 Experiment with your Desktop. Type ver at the prompt to see
what MATLAB version you are using and to see details about
your computer. If you are not using version R2021a, find the
windows discussed in this section. Examine the toolbar to locate
items similar to those shown in Figure 1.1–1.

Entering Commands and Expressions


To see how simple it is to use MATLAB, try some practice. Make sure the
cursor is at the prompt in the Command window. To divide 8 by 10, type
8/10 and press Enter (the symbol / is the MATLAB symbol for division).
Your entry and the MATLAB response look like the following on the screen
(we call this interaction between you and MATLAB an interactive session,
or simply a session). Remember, the symbol >> automatically appears on the
screen; you do not type it.
SESSION

page 7

MATLAB indents the numerical result. MATLAB uses high precision for
its computations, but by default it usually displays its results using four
decimal places except when the result is an integer.
If you make a mistake, for now just press Enter and retype the line
correctly. Ignore for now any error messages you may see.

Using Variables MATLAB assigns the most recent answer to a variable


called ans, which is an abbreviation for answer. A variable in MATLAB is a
symbol used to contain a value. You can use the variable ans for further
calculations; for example, using the MATLAB symbol for multiplication (*),
we obtain

Note that the variable ans now has the value 4.


You can use variables to write mathematical expressions. Instead of using
the default variable ans, you can assign the result to a variable of your own
choosing, say, r, as follows:

This is called an assignment statement. The variable, and only the variable,
is always on the left of the = symbol. This symbol is called the assignment or
replacement operator, and it cannot be used the same way as the equals sign
is used in mathematics. The previous entry means “assign the value of 8/10
to the variable r”.
If you now type r at the prompt and press Enter, you will see
thus verifying that the variable r has the value 0.8. You can use this variable
in further calculations. For example,

A common mistake is to forget the multiplication symbol * and page 8


type the expression as you would in algebra, as s = 20r. If you do this
in MATLAB, you will get an error message.
Spaces in the line improve its readability; for example, you can put a
space before and after the = symbol and the multiplication symbol * if you
want. So you could type

MATLAB ignores spaces when making its calculations, with one exception
that we will discuss in Chapter 2.

Order of Precedence
A scalar is a single number. A scalar variable is a variable that contains a
single number. MATLAB uses the symbols + − * / ^ for addition,
subtraction, multiplication, division, and exponentiation (power) of scalars.
These are listed in Table 1.1–1. For example, typing x = 8 + 3*5 returns the
answer x = 23. Typing 2^3 − 10 returns the answer ans = −2. The forward
slash (/) represents right division, which is the normal division operator
familiar to you. Typing 15/3 returns the result ans = 5.

Table 1.1–1 Scalar arithmetic operations


SCALAR

MATLAB has another division operator, called left division, which is


denoted by the backslash (\). The left division operator is useful for solving
sets of linear algebraic equations, as we will see. A good way to remember
the difference between the right and left division operators is to note that the
slash slants toward the denominator. For example, 7/2 = 2\7 = 3.5.
The mathematical operations represented by the symbols + − * / \ and ^
follow a set of rules called precedence. Mathematical expressions are
evaluated starting from the left, with the exponentiation operation having the
highest order of precedence, followed by multiplication and division with
equal precedence, followed by addition and subtraction with equal
precedence.
PRECEDENCE

Parentheses can be used to alter this order. Evaluation begins with the
innermost pair of parentheses and proceeds outward. Table 1.1–2
summarizes these rules. For example, note the effect of precedence on the
following session.
Table 1.1–2 Order of precedence

Table 1.1–3 Commands for managing the work session

page 9
To avoid mistakes, feel free to insert parentheses wherever you are unsure of
the effect precedence will have on the calculation. Use of parentheses also
improves the readability of your MATLAB expressions. For example,
parentheses are not needed in the expression 8 + (3*5), but they make clear
our intention to multiply 3 by 5 before adding 8 to the result.

page 10
Parentheses must be balanced, which means that there must be an equal
number of left-facing and right-facing parentheses. However, just because
they are balanced does not mean the expression is correct. For example, to
evaluate the expression

the following code gives the correct answer.

However, if you type by mistake

the parentheses are balanced and MATLAB will not give an error message
but the answer will be incorrect. For example, if x = 8, the correct answer is
180, but the previous code gives 100.

Test Your Understanding


T1.1–2 Use MATLAB to compute the following expressions.

T1.1–3 What answer is produced by the following MATLAB


expressions?

Proper Use of the Assignment Operator


It is important to understand that the = symbol in MATLAB works
differently than the equals sign you know from mathematics. When you type
x = 3, you tell MATLAB to assign the value 3 to the variable x. This usage
is no different than in mathematics. However, in MATLAB we can also type
something like this: x = x + 2. This tells MATLAB to add 2 to the current
value of x, and to replace the current value of x with this new value. If x
originally had the value 3, its new value would be 5. This use of the =
operator is different from its use in mathematics. For example, the
mathematics equation x = x + 2 is invalid because it implies that 0 = 2.

In MATLAB the variable on the left-hand side of the = operator is page 11


replaced by the value generated by the right-hand side. Therefore,
one variable, and only one variable, must be on the left-hand side of the =
operator. Thus in MATLAB you cannot type 6 = x. Another consequence of
this restriction is that you cannot write in MATLAB expressions like the
following:

The corresponding equation x + 2 = 20 is acceptable in algebra and has the


solution x = 18, but MATLAB cannot solve such an equation without
additional commands (these commands are available in the Symbolic Math
toolbox, which is described in Chapter 11).
Another restriction is that the right-hand side of the = operator must have
a computable value. For example, if the variable y has not been assigned a
value, then the following will generate an error message in MATLAB.

In addition to assigning known values to variables, the assignment


operator is very useful for assigning values that are not known ahead of time,
or for changing the value of a variable by using a prescribed procedure. The
following example shows how this is done.

EXAMPLE 1.1–1
Volume of a Circular Cylinder
The volume of a circular cylinder of height h and radius r is given by V =
πr2h. A particular cylindrical tank is 15 m tall and has a radius of 8 m. We
want to construct another cylindrical tank with a volume 20 percent greater
but having the same height. How large must its radius be?
■ Solution
First solve the cylinder equation for the radius r. This gives

The session is shown below. First we assign values to the variables r and h
representing the radius and height. Then we compute the volume of the
original cylinder and increase the volume by 20 percent. Finally we solve for
the required radius. For this problem we can use the MATLAB built-in
constant pi.

Thus the new cylinder must have a radius of 8.7636 m. Note that the page 12
original values of the variables r and V are replaced with the new
values. This is acceptable as long as we do not wish to use the original
values again. Note how precedence applies to the line V = pi*r^2*h;. It is
equivalent to V = pi*(r^2)*h;.
The expression r = (V/(pi*h))^(1/2) is an example of the use of nested
parentheses where the inner pair makes clear our intention to multiply pi by
h before dividing their product into V. The outer pair of parentheses is
required to indicate the target of the square root operation. You may always
use nested parentheses to indicate your intentions. Make sure they are used
in balanced pairs; otherwise you will get an “unbalanced parentheses
warning.”

Variable Names
The term workspace refers to the names and values of any variables in use in
the current work session. Variable names must begin with a letter; the rest of
the name can contain letters, digits, and underscore characters, but no spaces.
MATLAB is case-sensitive. Thus the following names represent five
different variables: speed, Speed, SPEED, Speed_1, and Speed_2.
There is a large, but finite limit to the number of characters in a name. This
can depend on the particular MATLAB version. Type namelengthmax to
determine this limit. MATLAB ignores any extra characters.
WORKSPACE

Managing the Work Session


Table 1.1–3 summarizes some commands and special symbols for managing
the work session. A semicolon at the end of a line suppresses printing the
results to the screen. If a semicolon is not put at the end of a line, MATLAB
displays the results of the line on the screen. Even if you suppress the display
with the semicolon, MATLAB still retains the variable’s value.

You can put several commands on the same line if you separate page 13
them with a comma if you want to see the results of the previous
command or semicolon if you want to suppress the display. For example,

Note that the first value of x was not displayed. Note also that the value of x
changed from 2 to 15.
If you need to type a long line, you can use an ellipsis, by typing three
periods, to delay execution. For example,

Tab Completion
MATLAB suggests corrections for syntax errors, which are incorrect
expressions in the MATLAB language. Suppose you mistakenly typed the
line
If you pressed Enter, MATLAB responds with an error message and asks if
you meant to type x = 1 + 2*(6+5). But if you did not yet press Enter,
instead of retyping the entire line, press the left-arrow key (←) several times
to move the cursor and add the missing t, then press Enter.
The left-arrow (←) and right-arrow (→) keys move left and right through
a line one character at a time. To move through one word at a time, press
Ctrl and → simultaneously to move to the right; press Ctrl and ←
simultaneously to move to the left. Press Home to move to the beginning of
a line; press End to move to the end of a line.
You can use the tab completion feature to reduce the amount of typing.
MATLAB automatically completes the name of a function, variable, or file if
you type the first few letters of the name and press the Tab key. If the name
is unique, it is automatically completed. For example, in the session listed
earlier, if you type Fruit and press Tab, MATLAB completes the name and
displays FruitPurchased. Press Enter to display the value of the variable,
or continue editing to create a new executable line that uses the variable
FruitPurchased. The tab completion feature also corrects for misspelling. If
you type fruit and press Tab, MATLAB correctly displays FruitPurchased.

If there is more than one name that starts with the letters you page 14
typed, MATLAB displays these names when you press the Tab key.
Use the mouse to select the desired name from the pop-up list by double-
clicking on its name.

Command History
The Pop-up Command History displays commands recently used in the
Command Window. By default it displays in response to the up-arrow (↑) in
the Command Window. You can use it for recalling, viewing, filtering, and
searching recently used commands in the Command Window To retrieve a
command in the list, use the up arrow key to highlight the desired command
and then press Enter, or use the mouse to select it. To retrieve a command
using a partial match, type any part of the command at the prompt, and then
press the up-arrow key. Marks the same color as error messages appear on
the left side of the Command History to indicate commands that generate
errors.
Deleting and Clearing
Press Del to delete the character at the cursor; press Backspace to page 15
delete the character before the cursor. Press Esc to clear the entire
line; press Ctrl and k simultaneously to delete (kill) to the end of the line.
MATLAB retains the last value of a variable until you quit MATLAB or
clear its value. Overlooking this fact commonly causes errors in MATLAB.
For example, you might prefer to use the variable x in a number of different
calculations. If you forget to enter the correct value for x, MATLAB uses the
last value, and you get an incorrect result. You can use the clear function to
remove the values of all variables from memory, or you can use the form
clear var1 var2 to clear the variables named var1 and var2. The effect of
the clc command is different; it clears the Command window of everything
in the window display, but the values of the variables remain.
You can type the name of a variable and press Enter to see its current
value. If the variable does not have a value (i.e., if it does not exist), you see
an error message. You can also use the exist function. Type exist('x') to see
if the variable x is in use. If a 1 is returned, the variable exists; a 0 indicates
that it does not exist. The who function lists the names of all the variables in
memory, but does not give their values. The form who var1 var2 restricts
the display to the variables specified. The wildcard character * can be used
to display variables that match a pattern. For instance, who A* finds all
variables in the current workspace that start with A. The whos function lists
the variable names and their sizes and indicates whether they have nonzero
imaginary parts.
The difference between a function and a command or a statement is that
functions have their arguments enclosed in parentheses. Commands, such as
clear, need not have arguments; but if they do, they are not enclosed in
parentheses, for example, clear x. Statements cannot have arguments; for
example, clc and quit are statements.
Press Ctrl-C to cancel a long computation without terminating the
session. You can quit MATLAB by typing quit. You can also click on the
File menu, and then click on Exit MATLAB.

Predefined Constants
MATLAB has several predefined special constants, such as the built-in
constant pi we used in Example 1.1–1. Table 1.1–4 lists them. The symbol
Discovering Diverse Content Through
Random Scribd Documents
ambition in this direction. In a council held at Rome in the year 769
this canon was passed: “Si quis ex episcopis … contra canonum et
sanctorum Patrum statuta prorumpens in gradum Majorum[98]
sanctæ Romanæ Ecclesiæ, id est presbyterorum cardinalium et
diaconorum, ire præsumpserit, … et hanc apostolicam sedem
invadere … tentaverit, et ad summum pontificalem honorem
ascendere voluerit, … fiat perpetuum anathema.”
There was at one period not a little divergence of opinion about
the precedence of cardinals over bishops; but the matter has long
ago been irrevocably settled. A cardinal, indeed, cannot, unless
invested with the episcopal character, perform any act that depends
for its validity upon such a character, nor can he lawfully invade the
jurisdiction of a bishop; but apart from this his rank in the church is
always, everywhere, and under all circumstances superior to that of
any bishop, archbishop, metropolitan, primate, or patriarch. Nor can
it be said that this is an anomaly, unless we are also prepared to
condemn other decisions of the church; for the precedence of
cardinals over bishops has a certain parity with that of the
archdeacons in old times over priests, which very example is brought
forward by Eugene IV. in 1431 to convince Henry, Archbishop of
Canterbury, who had a falling out with Cardinal John of Santa
Balbina: “Quoniam in hujusmodi prælationibus officium ac dignitas,
sive jurisdictio, præponderat ordini, quemadmodum jure cautum est
ut archidiaconus, non presbyter suæ jurisdictionis obtentu,
archipresbytero præferatur” (Bullarium Romanum, tom. iii.) But we
could bring a more cogent example from the modern discipline of
the church. A vicar-general, although only tonsured, outranks (within
the diocese) all others, because, as canonists say, unam personam
cum episcopo gerit; with as much justice, therefore, a cardinal, who
is a member of the pope, whose diocese is the world, precedes all
others (we speak of ecclesiastical rank) within mundane limits. There
is one example, particularly, in ecclesiastical history that shows us
how important was the influence of the Roman cardinals in the
whole church, and how great was the deference paid to them by
bishops. After the death of S. Fabian, in the year 250, the priests
and deacons—cardinals—of Rome governed the church for a year
during the vacancy of the see, and meanwhile wrote to S. Cyprian,
bishop, and to the clergy of Carthage, in a manner that could only
become a superior authority, as to how those should be treated who,
having lapsed from the faith during the persecution, now sought to
be reconciled. The holy bishop answered respectfully in an epistle
(xxth edition, Lipsiæ, 1838), in which he gave them an account of
his gests and government of the diocese. Pope Cornelius testifies
that the letters of the cardinals were sent to all parts to be
communicated to the bishops and churches (Coustant, Ep. RR. PP. x.
5). It is also very noteworthy that in the General Council of Ephesus,
in 431, of Pope Celestine’s three legates, the cardinal-priest
preceded the two others, although bishops, and before them signed
the acts. Those who say the Breviary according to the Roman
calendar are familiar with the fact that at an indefinitely early age
the cardinals were created (just as now) before the bishops of
various dioceses were named, hence those familiar words: “Mense
decembri creavit presbyteros (tot), diaconos (tot), episcopos per
diversa loca (tot).”
The importance of a cardinal a thousand years ago can be
imagined from the fact recorded by Muratori (Annali d’Italia, tom. v.
part. i. pag. 55), that when Anastasius had absented himself from
his title for five years without leave, and was residing in Lombardy,
three bishops went from Rome to invite him back, and the emperors
Louis and Lothaire also interposed their good offices.
Although all cardinals are equal among themselves in the principal
things, yet in many points of costume, privilege, local office, and
rank there are distinctions and differences established by law or
custom, the most important of which follow from the division of the
cardinals into three grades, namely, of bishops, priests, and deacons.
Although the whole number of suburbicarian sees, of titles, and
deaconries amounts to seventy-two (six for the first, fifty for the
second, and sixteen for the third class), the membership of the
Sacred College is limited since Sixtus V. to the maximum of seventy.
There can be no doubt that the episcopal sees lying nearest to, and,
so to speak, at, the very gates of Rome, have enjoyed from the
remotest antiquity some special pre-eminence; but it is not easy to
determine at what epoch their incumbents began to form a part of
the body of cardinals. It is certain only that they belonged to it in
the year 769. These suburban sees all received the faith from S.
Peter himself; and the tradition of Albano is that S. Clement, who
was afterwards pope, had been consecrated by the apostle and sent
there as his coadjutor and auxiliary. The number of these sees was
formerly seven, but for a long time has been only six. The Bishop of
Ostia and Velletri is the first of this order and Dean of the Sacred
College. He has the privilege of consecrating the pope, should he be
only in priest’s orders when elected, and of wearing the pallium on
the occasion.
The titles of the cardinal-priests are fifty, some being held by
persons who have been consecrated bishops but have no diocese, or
by jurisdictional bishops—i.e., those who are at the head of dioceses
and archdioceses. The most illustrious, though not the oldest, of
these is S. Lawrence in Lucina, which is called the first title, and
gives its cardinal precedence—other things being equal—in his class.
In the life of S. Fabian, who reigned in the year 238, we read that
he gave the districts of Rome in charge to the deacons: “Hic
regiones divisit diaconibus”; and these are supposed to have been
the first cardinal-deacons, or regionary cardinals, as they were long
called. This order is third in rank, but second in point of time when it
was admitted into the Sacred College. The number of cardinal-
deacons became fourteen (one for each of the civil divisions of the
city) towards the end of the VIth century, under the pontificate of S.
Gregory the Great. In the year 735 Pope Gregory III. added four and
raised the number to eighteen, which was reduced under Honorius
II., in the beginning of the XIIth century, to sixteen. After various
other mutations of number it was fixed as at present. Until the
pontificate of Urban II. in 1088 these cardinals were denominated by
the name of their district or region, except those added by Gregory
III., who were called palatines. After the XIth century they were
called from the name of their deaconries. S. Mary in Via Lata is the
first deaconry. The cardinal-deacons are often in priests’ orders; but
in this case they cannot celebrate Mass in public without a
dispensation from the Pope, but they can say it in their private
chapel in presence of their chaplain. In early times cardinal-deacons
held a position of very singular importance, and the pope was
frequently chosen from their restricted class. Even now some of the
highest positions at Rome are occupied by them.
Although a cardinal is created either a cardinal-priest or a cardinal-
deacon, there is a mode of advancement even to the chief
suburbicarian see. This is called, in the language of the Curia,
option, or the expressing a wish to pass from one order to a higher,
or from one deaconry, title, or see to another. The custom is
comparatively recent, and was looked upon at first with considerable
disfavor. It owes its origin to the schism which Alexander V.
attempted to heal in 1409 by forming one body of his own (the
legitimate) and of the pseudo-cardinals of the anti-pope Benedict
XIII. As there were two claimants to the several deaconries, titles,
and sees, he proposed to settle the dispute by permitting one of
them in succession to optate to the first vacant place in his order.
What was meant as a temporary measure became an established
custom under Sixtus IV. (1471-1484). If a cardinal-bishop be too
infirm to perform episcopal duties in the see which he already fills,
Urban VIII. decreed that he cannot pass to another one. If a
cardinal-deacon obtain by option a title before he has been ten years
in his own order, he must take the lowest place among the priests;
but if after that period, he takes precedence of all who have been
created in either of the two orders since his elevation. The favor of
option is asked of the pope in the consistory held next after a
vacancy has occurred, by the cardinal proposing such a change. The
prefect of pontifical ceremonies having previously assured himself
that no cardinal outranking the postulant contemplates the same,
the cardinal-priest, to give an example from this order, rises and
says: “Beatissime Pater, si sanctitati vestræ placuerit dimisso titulo
N. transitu ex ordine presbyterali ad episcopalem, opto ecclesiam
N.,” naming his title and the suburbicarian see that he seeks to
occupy.
These three orders of cardinals certainly had a corporate character
at an early period, and formed what the ancients called a college
with its officers and by-laws; but Arnulf, Bishop of Lisieux in the Xth
century, was the first to call them collectively Collegium Sanctorum;
hence in all languages it is now called the Sacred College. A proof
that the cardinals acted together in a public capacity, and of their
exalted dignity, is that they are termed Proceres clericorum by
Anastasius in the Life of S. Leo III. In olden times cardinals were
strictly obliged to reside near the pope; and a Roman council,
composed of sixty-seven bishops, held in 853 under S. Leo IV., called
in judgment and deposed the cardinal-priest of S. Marcellus for
having contumaciously absented himself during a long time from his
title. This obligation of residence in the house or palace annexed to
the title or the deaconry was somewhat relaxed in the XIIth century,
when bishops of actual jurisdiction began to be created cardinals.
The first example of a bishop governing a diocese who was made a
cardinal is that of Conrad von Wittelsbach, of the since royal house
of Bavaria, Archbishop of Mentz, who was raised to this dignity by
Alexander III. in 1163.
Innocent III., however, refused a petition of the good people of
Ravenna to let them have a certain cardinal for their archbishop,
saying that he was more useful to Rome and to the church at large
where he was than he could possibly be in any other position. At this
period, and until a considerable time after, it was very rare that a
bishop was made a cardinal without having to resign his diocese and
reside in curia.
Leo X. was so strict in his ideas of the duty of cardinals to live
near him that he issued a bull renewing the obligation in very strong
terms; and in 1538 it was proposed to Paul III. to draw up a plan of
reform making it incompatible to govern a diocese and be at the
same time a cardinal, except in the case of the Fathers of the First
Order, who, from the nearness of their sees to Rome, could perform
their service to the pope as his councillors and assistants, and not
neglect the faithful over whom they were placed (Natalis Alexander,
Hist. Eccl., tom. xvii. art. 16). No such stringent rule was adopted,
and a cardinal might be this and govern a diocese, if he made it his
place of habitual residence, according to the decree of the Council of
Trent (Session xxiii., on Ref., ch. 1).
Of the virtue, learning, and other qualities required in a cardinal of
the Holy Roman Church, SS. Peter Damian and Bernard have written
eloquently, and Honorius IV., of the great family of Savelli, once so
powerful in Rome, was inexorable against unworthy subjects, saying
that “he never would raise to the Roman purple any save good and
wise men.” Different popes have made excellent laws on these
matters and others connected with the cardinalate; but in some
cases they have been disregarded, especially those about age and
about there not being two near relatives in the Sacred College at the
same time. The practice of the last hundred years has been above
cavil, and the abuses of other ages have been exaggerated, partly
through malice, and partly from not knowing the secret reasons that
popes may have had for creating, for instance, mere youths—royal
youths—cardinals, or conferring the high dignity upon members of
their own family, or upon men who had nothing to recommend them
but the importunate demands of their sovereigns. The hat bestowed
upon S. Charles Borromeo was productive of more good than all the
rest of “nepotism” was able to effect of evil.
The creation of cardinals is an exclusive privilege of the popes; but
they have sometimes granted the prayers of the Sacred College or of
sovereign princes asking to have the dignity conferred upon certain
subjects. For a long time, especially during the XVIth century, the
governments of France, Spain, Portugal, Poland, and the republic of
Venice were favored by being permitted to name once in each
pontificate a candidate for the cardinalate. This was called a crown
nomination. Clement V. is said (Cancellieri, Mercato, p. 105, note 3)
to have been the first to grant to princes the right of petitioning for a
hat; and the sultan Bajazet II. wrote on 28th September, 1494, to
Alexander VI., begging him to make a perfect cardinal of Nicholas
Cibo, Archbishop of Aries, and cousin of Pope Innocent VIII. Clement
XII. in 1732 tendered to James III. (the “Elder Pretender”) the
nomination of some subject to the cardinalate, and he, like a true
Stuart, neglecting his countrymen and those who had suffered in his
cause, proposed Mgr. Rivera, whom he had taken a liking to for little
courtesies shown at Urbino. It has long been a custom for the pope
to promote to this dignity a member of the family or one of that
religious order to which his predecessor belonged, from whom he
himself received it. The Italians call this a restitution of the hat—
Restituzione di capello. The number of cardinals has greatly varied at
different times. It was generally smaller before than ever since the
XVIth century. The cardinals could, of course, well be all Romans, as
they were in the beginning; but with a change of circumstances the
pontiffs have recognized the propriety of S. Bernard’s suggestive
query to Eugene III.: “Annon eligendi de toto orbe, orbem
judicaturi?” (De Consid., iv. 4). In 1331 John XXII. (himself a
Frenchman), being asked by the king to create a couple of French
cardinals, replied that two were too many, and he would make but
one, because there were only twenty cardinals in all, and seventeen
of them were Frenchmen. In 1352, after the death of Clement VI.,
the cardinals attempted to restrict the Sacred College to twenty
members, on the principle that a dignity profusely conferred is
despised—communia vilescunt; but Urban VI. found himself
constrained, by the course of events at the schism, to create a large
number of cardinals, in order to oppose them to the pseudo-
cardinals of Clement VII., and at one creation he made twenty-nine,
all except three being his own countrymen, Neapolitans; so that the
French of another generation were richly paid back for their former
preponderance. From this time the membership of the Sacred
College gradually increased up to the middle of the XVIth century. It
is much to the credit of Pius II. that when the Sacred College in
1458 remonstrated with him on the number of cardinals, saying that
the cardinalate was going down, and begged him not to increase its
membership to any considerable extent, he told the fathers that as
head of the church he could not refuse the reasonable requests of
kings and governments in such a matter, but that, apart from this,
his honor forbade him to neglect the subjects of other countries than
Italy in the distribution of the highest favors in his gift (Comment. Pii
II., lib. ii. pp. 129, 130). Leo X., believing himself disliked by many
cardinals, added thirty-one to their number at a single creation on
July 1, 1517, the like of which the court has never seen before or
after; but it had the desired effect. The Council of Trent ordained
(Sess. 24, De Ref., c. i.) concerning the subjects of the cardinalate
that “the Most Holy Roman Pontiff shall, as far as it can be
conveniently done, select (them) out of all the nations of
Christendom, as he shall find persons suitable.” This is not to be
understood, however worded, as more than a recommendation to
the pope. Paul IV. (Caraffa, 1555-59), a great reformer, after
consulting the Sacred College and long discussions, issued a bull
called the Compact—Compactum—in which he decreed that the
cardinals should not be more than forty; but his immediate
successor, Pius IV. (Medici), acting on the principle that one pope
cannot bind another in disciplinary matters, created forty-six. Sixtus
V. in 1585 fixed the number at seventy in imitation of the seventy
elders chosen to assist Moses; and since then all the popes have
respected this precedent. During the long reign of Pius VII.,
although, on account of the times, unable to hold a consistory for
many years, he created in all ninety-eight cardinals, and when he
died left ten in petto. Although, on the one hand, an excessive
number of cardinals would lessen the importance and lower the
dignity of the office, yet a very small number has occasioned long
and disedifying conclaves, whereby for months, and even years, the
Holy See has been vacant, to the great detriment of the church. This
was the case four times during the XIIIth century, and by a
coincidence, each time it was after a pope who was the fourth of his
name, viz., Celestine (1241), Alexander (1261), Clement (1268), and
Nicholas (1292).
The subject of this article has grown so much under our hands
that we are reluctantly compelled to defer a description of the
ceremonies attendant on the election of cardinals, etc., till the July
number of The Catholic World.
ON THE WAY TO LOURDES.
“Quacumque ingredimur, in aliquam historiam vestigium
ponimus.”—Cicero.

The most direct route from Paris to Notre Dame de Lourdes


crosses the Bordeaux and Toulouse Railway at Agen, where the
pilgrim leaves the more frequented thoroughfares for an obscurer
route, though one by no means devoid of interest, especially to the
Catholic of English origin; for the country we are now entering was
once tributary to England, and at every step we come, not only upon
the traces it has left behind, but across some unknown saint of
bygone times, like a fossil of some rare flower with lines of beauty
and grace that ages have not been able to efface.
Approaching Agen, we imagined ourselves coming to some large
city, so imposing are the environs. The broad Garonne is flowing
oceanward, its shores bordered by poplars, and overlooked by hills
whose sunny slopes are covered with vineyards and plum-trees.
Boats from Provence and Languedoc are gliding along the canal,
whose massive bridge, with its gigantic arches, harmonizes with the
landscape, and reminds one of the Roman Campagna. The plain is
vast, fertile, and smiling; the heavens glowing and without a cloud.
Every hill, like Bacchus, has its flowing locks wreathed with vines of
wonderful luxuriance, and is garlanded with clusters of grapes,
under which it reels with joyous intoxication. Everywhere are white
houses, fair villas, pleasant gardens, and all the indications of a
prosperous country.
The town does not correspond with its surroundings. It is damp
and said to be unhealthy. The streets are narrow and winding, the
houses without expression. The population is mostly made up of
merchants, mechanics, and gens de robe. Here and there we find a
noble mansion, a few great families, and a time-honored name; but
the true lords of the place are the public functionaries, worthy and
grave, and clad in solemn black, quite in contrast with the joyous
character of the people. The local peculiarities of the latter may be
studied to advantage in an irregular square bordered with low
arcades—the centre of traffic for all the villages eight or ten leagues
around. Famous fairs are held here three or four times a year, one
for the sale of prunes—and the Agen prunes are famous—but the
most important one is the lively, bustling fair of the Gravier, which
brings together all the blooming grisettes of the region, who, in
festive mood and holiday attire, gather around the tempting booths.
The Gravier was formerly a magnificent promenade of fine old elms,
which Jasmin loved to frequent, and where he found inspiration for
many of his charming poems in the Gascon language—one of the
Romance tongues; for the so-called patois of this part of the country
is by no means a corruption of the French, but a genuine language,
flexible, poetic, and wonderfully expressive of every sweet and
tender emotion. Some of Jasmin’s poems have been translated by
our own poet Longfellow with much of the graceful simplicity of the
original. Most of the fine elms of the Gravier have been cut down
within a few years, to the great regret of the people.
One of the most striking features of the landscape in approaching
Agen is a mount at the north with a picturesque church and spire.
This is the church of the Spanish Carmelites, who, driven some years
ago from their native country, came to take refuge among the caves
of the early martyrs beside the remains of an old Roman castrum
called Pompeiacum. Here is the cavern, hewn centuries ago out of
the solid rock, where S. Caprais, the bishop, concealed himself in the
time of the Emperor Diocletian to escape from his persecutors. And
here is the miraculous fountain that sprang up to quench his thirst;
sung by the celebrated Hildebert in the XIth century

“Rupem percussit, quam fontem fundere jussit;


Qui fons mox uber fit, dulcis, fitque saluber,
Quo qui potatur, mox convalet et recreatur.”
That is to say: “Caprais smote the rock, and forth gushed a fount
of living water, sweet and salutary to those who come to drink
thereof,” as the pilgrim experiences to this day.
From the top of this mount S. Caprais, looking down on the city,
saw with prophetic eye S. Foi on the martyr’s pile, and a mysterious
dove descending from heaven, bearing a crown resplendent with a
thousand hues and adorned with precious stones that gleamed like
stars in the firmament, which he placed on the virgin’s head,
clothing her at the same time with a garment whiter than snow and
shining like the sun. Then, shaking his dewy wings, he extinguished
the devouring flames, and bore the triumphant martyr to heaven.
After the martyrdom of S. Caprais, the cave he had sanctified was
inhabited by S. Vincent the Deacon, who, in his turn, plucked the
blood-red flower of martyrdom, and went with unsullied stole to join
his master in the white-robed army above. Or, as recorded by
Drepanius Florus, the celebrated deacon of Lyons, in the IXth
century: “Aginno, loco Pompeiano, passio sancti Vincentii, martyris,
qui leviticæ stolæ candore micans, pro amore Christi martyrium
adeptus, magnis sæpissime virtutibus fulget.”
His body was buried before S. Caprais’ cave, and, several centuries
after, a church was built over it, which became a centre of popular
devotion to the whole country around, who came here to recall the
holy legends of the past and learn anew the lesson of faith and self-
sacrifice. Some say it was built by Charlemagne when he came here,
according to Turpin, to besiege King Aygoland, who, with his army,
had taken refuge in Agen. This venerable sanctuary was pillaged and
then destroyed by the Huguenots in 1561, and for half a century it
lay in ruins. The place, however, was purified anew by religious rites
in 1600; the traditions were carefully preserved; and every year the
processions of Rogation week came to chant the holy litanies among
the thorns that had grown up in the broken arches. Finally, in 1612,
the city authorities induced a hermit, named Eymeric Rouidilh, from
Notre Dame de Roquefort, to establish himself here. He was a good,
upright man, as charitable as he was devout, mocked at by the
wicked, but converting them by the very ascendency of his holy life.
He brought once more to light the tomb of S. Vincent and S. Caprais’
chair, and set to work to build a chapel out of the remains of the
ancient church. The dignitaries of the town came to aid him with
their own hands, the princes of France brought their offerings, and
Anne of Austria came with her court to listen to the teachings of the
holy hermit. Among other benefactors of the Hermitage were the
Duc d’Epernon, Governor of Guienne, and Marshal de Schomberg,
the first patron of the great Bossuet.
Eymeric’s reputation for sanctity became so great that he drew
around him several other hermits, who hollowed cells out of the
rock, and endeavored to rival their master in the practice of rigorous
mortification. They rose in the night to chant the divine Office, and
divided the day between labor and prayer, only coming together for
a half-hour’s fraternal intercourse after dinner and the evening
collation. Eymeric himself, at night, sang the réveillè in the streets of
Agen, awakening the echoes of the night with a hoarse, lamentable
voice: “Prégats pous praubés trépassats trépassados que Diou lous
perdounné!”—Pray for the poor departed, that God may pardon
them all!
Eymeric was so scrupulous about using the water of S. Caprais’
fountain for profane purposes that, discovering some plants that
gave indications of a source, he labored for six months in excavating
the rock, till at length he came so suddenly upon a spring that he
was deluged with its waters.
During the plague of 1628, and at other times of public distress,
his heroic charity was so fully manifest that he was regarded as a
public benefactor; and when he died, the most distinguished people
in the vicinity came to testify their veneration and regret.
The cells of the Hermitage continued, however, to be peopled till
the great revolution, when the place was once more profaned. But in
1846 a band of Spanish Carmelites came to establish themselves on
the mount sanctified by the early martyrs. Martyrs, too, of the soul
are they; for there is no martyrdom more severe than the inward
crucifixion of those who, in the cloister, offer themselves an
unbloody sacrifice to God for the sins of the world. Some, who have
not tried it, think the monastic life to be one of ease and self-
indulgence. But let them seriously reflect on the “years of solitary
weariness, of hardship and mortification, of wakeful scholarship, of
perpetual prayer, unvisited by a softness or a joy beyond what a
bird, or a tree, or an unusually blue sky may bring,” with no
consolations except those that spring from unfaltering trust in Christ
and utter abandonment to his sweet yoke, and they will see that,
humanly speaking, such a life is by no means one of perfect ease.
On this new Carmel lived for a time Père Hermann, the
distinguished musician, who was so miraculously converted by the
divine manifestation in the Holy Eucharist, and it was here he gave
expression to the ardor of his Oriental nature in some of his glowing
Cantiques to Jésus-Hostie, worthy to be sung by seraphim:

“Pain Vivant! Pain de la Patrie!


Du désir et d’amour mon âme est consumée
Ne tardez plus! Jésus, mon Bien-Aimé,
Venez, source de vie,
Ne tardez plus! Jésus, mon Bien-Aimé!”

Agen is mentioned on every page of the religious history of


southern France. In the IIId century we find the confessors of the
faith already mentioned. Sixty years later S. Phoebadus, a monk of
Lerins who became Bishop of Agen, defended the integrity of the
Catholic faith against the Arians in an able treatise. He was a friend
of S. Hilary of Poitiers and S. Ambrose of Milan. St. Jerome speaks of
him as still living in the year 392: “Vivit usque hodie decrepitâ
senectute.” In the time of the Visigoths SS. Maurin and Vincent de
Liaroles upheld and strengthened the faith in Novempopulania.
In feudal times the bishops of Agen were high and puissant lords
who had the royal prerogative of coining money by virtue of a
privilege conferred on them by the Dukes of Aquitaine. The money
they issued was called Moneta Arnaldina, or Arnaudenses, from
Arnaud de Boville, a member of the ducal family, who was the first
to enjoy the right.
It was a bishop of Agen, of the illustrious family Della Rovere that
gave two popes—Sixtus IV. and Julius II.—to the church, who
induced Julius Cæsar Scaliger to accompany him when he took
possession of his see. Scaliger’s romantic passion for a young girl of
the place led him to settle here for life. Not far from Agen may still
be seen the Château of Verona, which he built on his wife’s land,
and named in honor of his ancestors of Verona—the Della Scalas,
whose fine tombs are among the most interesting objects in that
city. This château is in a charming valley. It remained unaltered till
about forty years ago; but it is now modernized, and therefore
spoiled. The oaks he planted are cut down, the rustic fountain he
christened Théocrène is gone. Only two seats, hewn out of
calcareous rock, remain in the grounds, where he once gathered
around him George Buchanan, Muret, Thevius, and other
distinguished men of the day. These seats are still known as the
Fauteuils de Scaliger.
The elder Scaliger was buried in the church of the Augustinian
Friars, which being destroyed in 1792, his remains were removed by
friendly hands for preservation. They have recently been placed at
the disposition of the city authorities, who will probably erect some
testimonial to one who has given additional celebrity to the place.
The last descendant of the Scaligers—Mlle. Victoire de Lescale—died
at Agen, January 25, 1853, at the age of seventy-six years.
Agen figures also in the religious troubles of the XVIth century, as
it was part of the appanage of Margaret of Valois; but it generally
remained true to its early traditions. Nérac, the seat of the Huguenot
court at one time, was too near not to exert its influence. Then came
Calvin himself, when he leaped from his window and fled from Paris.
Theodore Beza too resided there for a time. They were protected by
Margaret of Navarre, who gathered around her men jealous of the
influence of the clergy and desirous themselves of ruling over the
minds of others. They boldly ridiculed the religious orders, and
censured the morals of the priesthood, though so many prelates of
the time were distinguished for their holiness and ability. Nérac has
lost all taste for religious controversy in these material days. It has
turned miller, and is only noted for its past aberrations and the
present superiority of its flour.
On the other side of the Garonne, towards the plain of Layrac, we
come to the old Château of Estillac, associated with the memory of
Blaise de Monluc, the terrible avenger of Huguenot atrocities in this
section of France. He was an off-shoot of the noble family of
Montesquiou, and served under Bayard, Lautrec, and Francis I.—a
small, thin, bilious-looking man, with an eye as cold and hard as
steel, and a face horribly disfigured in battle, before whom all parties
quailed, Catholic as well as Protestant. He had the zeal of a Spaniard
and the bravado of a true Gascon; was sober in his habits,
uncompromising in his nature, and, living in his saddle, with rapier in
hand, he was always ready for any emergency, to strike any blow;
faithful to his motto: “Deo duce, ferro comite.”
We are far from justifying the relentless rigor of Monluc; but one
cannot travel through this country, where at every step is some trace
of the fury with which the Huguenots destroyed or desecrated
everything Catholics regard as holy, without finding much to
extenuate his course. We must not forget that the butchery which
filled the trenches of the Château de Penne was preceded by the
sack of Lauzerte, where, according to Protestant records, Duras
slaughtered five hundred and sixty-seven Catholics, of whom one
hundred and ninety-four were priests; and that the frightful
massacre of Terraube was provoked by the treachery of Bremond,
commander of the Huguenots at the siege of Lectoure.
Among the other remarkable men upon whose traces we here
come is Sulpicius Severus, a native of Agen. His friend, S. Paulinus of
Nola, tells us he had a brilliant position in the world, and was
universally applauded for his eloquence; but converted in the very
flower of his life, he severed all human ties and retired into solitude.
He is said to have founded the first monastery in Aquitaine,
supposed to be that of S. Sever-Rustan, where he gave himself up to
literary labors that have perpetuated his name. The Huguenots
burned down this interesting monument of the past in 1573, and
massacred all the monks. It was from the cloister of Primulacium, as
it was then called, that successively issued his Ecclesiastical History,
which won for him the title of the Christian Sallust; the Life of S.
Martin of Tours, written from personal recollections; and three
interesting Dialogues on the Monastic Life, all of which were
submitted to the indulgent criticism of S. Paulinus before they were
given to the public. The intimacy of these two great men probably
began when S. Paulinus lived in his villa Hebromagus, on the banks
of the Baïse, and it was by no means broken off by their separation.
The latter made every effort to induce his friend to join him at Nola;
but we have no reason to complain he did not succeed, for this led
to a delightful correspondence we should be sorry to have lost. We
give one specimen of it, in which modesty is at swords’ points with
friendship. Sulpicius had built a church at Primulacium, and called
upon his poet-friend to supply him with inscriptions for the walls.
The baptistery contained the portrait of S. Martin, and, wishing to
add that of Paulinus, he ventured to ask him for it. Paulinus’ humility
is alarmed, and he flatly refuses; but he soon learns his likeness has
been painted from memory, and is hanging next that of the holy
Bishop of Tours. He loudly protests, but that is all he can do, except
avenge his outraged humility by sending the following inscription to
be graven beneath the two portraits: “You, whose bodies and souls
are purified in this salutary bath, cast your eyes on the two models
set before you. Sinners, behold Paulinus; ye just, look at Martin.
Martin is the model of saints; Paulinus only that of the guilty!”
Sometimes there is a dash of pleasantry in their correspondence,
as when Paulinus sends for some good Gascon qualified to be a cook
in his laura. Sulpicius despatches Brother Victor with a letter of
recommendation which perhaps brought a smile to his friend’s face:
“I have just learned that every cook has taken flight from your
kitchen. I send you a young man trained in our school, sufficiently
accomplished to serve up the humbler vegetables with sauce and
vinegar, and concoct a modest stew that may tempt the palates of
hungry cenobites; but I must confess he is entirely ignorant of the
use of spices and all luxurious condiments, and it is only right I
should warn you of one great fault: he is the mortal enemy of a
garden. If you be not careful, he will make a frightful havoc among
all the vegetables he can lay his hands on. He may seldom call on
you for wood, but he will burn whatever comes within his reach. He
will even lay hold of your rafters, and tear the old joists from your
chimneys.”
Among other Agen literary celebrities is the poet Antoine de La
Pujade, who was secretary of finances to Queen Margaret of Navarre
—not the accomplished, fascinating sister of Francis I., but the wife
of the Vert-Galant, “Du tige des Valois belle et royale fleur,” who
encouraged and applauded the poet, and even addressed him
flattering verses. His tender, caressing lines on the death of his little
son of four years of age are well known:

“Petite âme mignonnelette,


Petite mignonne âmelette,
Hôtesse d’un si petit corps!
Petit mignon, mon petit Pierre,
Tu laisses ton corps à la terre,
Et ton âme s’en va dehors.”

La Pujade consecrated his pen to the Blessed Virgin in the


Mariade, a poem of twelve cantos in praise of the très sainte et très
sacrée Vierge Marie.
Another rhymer of Agen, and a courtier also, is Guillaume du
Sable, a Huguenot, who in his verses held up his wife, his daughter,
and his son-in-law as utterly given up to avarice. As for himself, he
was always ready to spend! Yes, and as ready to beg. That he was
by no means grasping, that his palms never itched, is shown by his
poems, which are full of petitions to the king for horses, clothes, and
appointments. Like so many of his co-religionists, he did not disdain
the spoils of the enemy, as is apparent from this modest request to
Henry IV.:

“Mais voulez-vous guérir, Sire, ma pauvreté?


Donnez-moi, s’il vous plait, la petite abbaye,
Ou quelque prieuré le reste de ma vie,
Puisque je l’ai vouée à votre majesté.”

He wrote against priests and monks, but stuck to the royal party,
condemning all who revolted under pretext of religion. Perhaps the
most supportable of his works is that against the Spanish Inquisition
—a subject that never needs any sauce piquante. His Tragique Elégie
du jour de Saint Barthélemy affords an additional proof in favor of
the approximate number of one thousand victims at the deplorable
massacre of August 24, 1572.
As a proof of the tenacity with which the Agenais have clung to
past religious traditions and customs, we will cite the popular saying
that arose from the unusual dispensations granted during Lent by
Mgr. Hébert, the bishop of the diocese, in a time of great distress
after an unproductive year:
“En milo sept centz nau L’abesque d’Agen debenguèt Higounau”—
In 1709 the Bishop of Agen turned Huguenot!
Leaving Agen by the railway to Tarbes, we came in ten minutes to
Notre Dame de Bon Encontre—a spot to which all the sorrows and
fears and hopes of the whole region around are brought. This chapel
is especially frequented during the month of May, when one parish
after another comes here to invoke the protection of Mary. A
continual incense of prayer seems to rise on the sacred air from this
sweet woodland spire. A few houses cluster around the pretty
church, which is surmounted by a colossal statue of the Virgin
overlooking the whole valley and flooding it with peace, love, and
boundless mercy. The image of her who is so interwoven with the
great mysteries of the redemption can never be looked upon with
indifference or without profit. The soul that finds Mary in the tangled
grove of this sad world enters upon a “moonlit way of sweet
security.”
We next pass Astaffort, a little village perched on a hill overlooking
the river Gers, justifying its ancient device: Sta fortiter.[99] It played
an important part in the civil wars of the country. The Prince de
Condé occupied the place with four hundred men, and, attacked by
the royalists, they were all slain but the prince and his valet, who
made their escape. A cross marks the burial-place of the dead
behind the church of Astaffort, still known as the field of the
Huguenots.
Lectoure, like an eagle’s nest built on a cliff, is the next station,
and merits a short tarry; for, though fallen from its ancient grandeur,
it is a town full of historic interest, and contains many relics of the
past. It is a place mentioned by Cæsar and Pliny, and yet so small
that we wonder what it has been doing in the meantime. It was one
of the nine cities of Novempopulania, and in the IXth century still
boasted the Roman franchise, and was the centre of light and
legislation to the country around, on which it imposed its customs
and laws. It governed itself, lived its own individual life, unaffected
by the changes of surrounding provinces, and proudly styled itself in
its public documents “the Republic of Lectoure.” In the XIIth century
it was the stronghold of the Vicomtes de Lomagne; and when
Richard Cœur de Lion wished to bring Vivian II. of that house to
terms, he laid siege to Lectoure, which, though stoutly defended for
a time, was finally obliged to yield. In 1305 it belonged to the family
of Bertrand de Got (Pope Clement V.), which accounts for a bull of
his being dated at Lectoure. Count John of Armagnac married Reine
de Got, the pope’s niece, in 1311, and thus the city fell into the
hands of the haughty Armagnacs, who made it their capital. At this
time they were the mightiest lords of the South of France, and
seemed to have inherited the ancient glory of the Counts of
Toulouse. For a time they held the destiny of France itself in their
hands. For one hundred and fifty years they took a prominent part in
all the French wars. Their banner, with its lion rampant, floated on
every battle-field. Their war-cry—Armagnac!—resounded in the ears
of the Derbys and Talbots. It was an Armagnac that sustained the
courage of France after the surrender of King John at Poitiers; an
Armagnac that united all the South against the English in the Etats-
Généraux de Niort; and an Armagnac—Count Bernard VI.—who
maintained the equilibrium of France when Jean-sans-Peur of
Burgundy aimed at supremacy, and fell a victim to Burgundian
vengeance at Paris.
Lectoure gives proofs of its antiquity and the changes it has
passed through in the remains of its triple wall; its fountain of Diana;
the bronzes, statuettes, jewels, and old Roman votive altars, that are
now and then brought to light; its mediæval castle, and the
interesting old church built by the English during their occupancy,
with its massive square tower, whence we look off over the valley of
the Gers, with its orchards and vineyards and verdant meadows shut
in by wooded hills, and see stretching away to the south the
majestic outline of the Pyrenees.
At the west of Lectoure is the forest of Ramier, in the midst of
which once stood the Cistercian abbey of Bouillas—Bernardus valles
—founded in 1125, but now entirely destroyed.

“Never was spot more sadly meet


For lonely prayer and hermit feet.”

There is a popular legend connected with these woods, the truth


of which I do not vouch for—I tell the tale as ’twas told to me:
A poor charcoal-burner, who lived in this forest close by the
stream of Rieutort, had always been strictly devout to God and the
blessed saints, but, on his deathbed, in a moment of despair at
leaving his three motherless children without a groat to bless
themselves with, invoked in their behalf the foul spirit usually
supposed to hold dominion over the bowels of the earth, with its
countless mines of silver and gold. He died, and his three sons
buried him beside their mother in the graveyard of Pauillac; but the
wooden cross they set up to mark the spot obstinately refused to
remain in the ground. Terrified at this ominous circumstance, the
poor children fled to their desolate cabin. The night was dark and
cold, and wolves were howling in the forest. “Brothers,” said the
oldest, “we shall die of hunger and cold. There is not a crumb of
bread in the house, and the doctor carried off all our blankets
yesterday for his services. The Abbey of Bouillas is only half a league
off. I am sure the good monks will not refuse alms to my brother
Juan. And little Pierréto shall watch the house while I go to the
Castle of Goas.”
Both brothers set off, leaving Pierréto alone in the cabin. He
trembled with fear and the cold, and at length the latter so far
prevailed that he ventured to the door to see if he could not catch a
glimpse of his brothers on their way home. It was now “the hour
when spirits have power.” Not a hundred steps off he saw a group of
men dressed in rich attire, silently—“all silent and all damned”—
warming themselves around a good fire. The shivering child took
courage, and, drawing near the band, begged for some coals to light
his fire. They assented, and Pierréto hurriedly gathered up a few and
went away. But no sooner had he re-entered the cabin than they
instantly went out. He went the second time, and again they were
extinguished. The third time the leader of the band frowned, but
gave him a large brand, and threateningly told him not to come
again. The brand went out like the coals; and the men and fire
disappeared as suddenly. Pierréto remained half dead with fright. An
hour after Juan returned from the Convent of Bouillas with bread
enough to last a week, and Simoun soon arrived from the castle with
three warm blankets.
When daylight appeared, Pierréto went to the fire-place to look at
his coals, and found they had all turned to gold. The two oldest now
had the means of making their way in the world. One became a
brave soldier, and the other a prosperous merchant; but Pierro
became a brother in the Abbey of Bouillas. Night after night, as he
paced the dark cloisters praying for his father’s soul, he heard a
strange rushing as of fierce wind through the arches, and a wailing
sound as sad as the Miserere. Pierro shuddered and thought of the
cross that refused to darken his father’s grave; but he only prayed
the longer and the more earnestly.
Years passed away. Simoun and Juan, who had never married,
weary of honors and gain, came to join their brother in his holy
retreat. Their wealth, that had so mysterious an origin, was given to
God in the person of the poor. Then only did the troubled soul of
their father find rest, and the holy cross consent to throw its shadow
across his humble grave.
Lectoure is surrounded by ramparts; but the most remarkable of
its ancient defences is the old castle of the Counts of Armagnac,
converted into a hospital by the Bishop of Lectoure in the XVIIIth
century. This castle witnessed the shameless crimes of Count John
IV. and their fearful retribution at the taking of Lectoure under Louis
XI. The tragical history of this great lord affords a new proof of the
salutary authority exercised by the church over brutal power and
unrestrained passion during the Middle Ages.
There is no more striking example of the degradation of an
illustrious race than that of John V., the last Count of Armagnac, who
shocked the whole Christian world by an unheard-of scandal. Having
solicited in vain a dispensation to marry his sister Isabella, who was
famous for her beauty, he made use of a pretended license,
fraudulently drawn up in the very shadow of the papal court, as
some say, to allay Isabella’s scruples, and celebrated this monstrous
union with the greatest pomp. He forgot, in the intoxication of power
and the delirium of passion, there could be any restraint on his
wishes, that there was a higher tribunal which watched vigilantly
over the infractions of the unchangeable laws of morality and
religion. The pope fulminated a terrible excommunication against
them. King Charles VII., hoping to wipe out so fearful a stain by the
sacred influences of family affection, sent the most influential
members of the count’s family to exert their authority; but in vain.
The king soon turned against him, because he favored the revolt of
the Dauphin, and sent an army to invade his territory. Count John’s
only fear was of losing Isabella; and rather than separate from her
to fight for the defence of his domains, he fled with her to the valley
of Aure, while the royal army ravaged his lands.
Condemned to perpetual banishment, deprived of his dominions,
his power gone, under the ban of the church, his eyes were opened
to the extent of his degradation, his soul was filled with remorse. He
took the pilgrim’s staff and set out for Rome, begging his bread by
the way, to seek absolution for himself and his sister. Isabella retired
from the world to do penance for her sins in the Monastery of Mount
Sion at Barcelona. The church, which never spurns the repentant
sinner, however stained with crime, granted him absolution on very
severe conditions. The learned Æneas Sylvius (Pius II.) occupied the
chair of S. Peter at that time. His great heart was touched by the
heroic penance of so great a lord. He received him kindly, dwelt on
the enormity of the scandal he had given to the world, and reminded
him that Pope Zachary had condemned a man, guilty of an offence
of the same nature, to go on a round of pilgrimages for fourteen
years, the first seven of which he was ordered to wear an iron chain
attached to his neck or wrist, fast three times a week, and only drink
wine on Sundays; but the last seven he was only required to fast on
Fridays; after which he was admitted to Communion.
More merciful, Pius II. enjoined on Count John never to hold any
communication with Isabella by word, letter, or message; to
distribute three thousand gold crowns for the reparation of churches
and monasteries; and to fast every Friday on bread and water till he
could take up arms against the Turks; all of which the count
solemnly promised to do. Nor do we read he ever violated his word.
Affected by such an example of penitence, the pope addressed
Charles VII. a touching brief to induce him to pardon the count.
When Louis XI. came to the throne, remembering the services he
had received from Count John, he restored him to his rank. The
count now married a daughter of the house of Foix. Everything
seemed repaired. But divine justice is not satisfied. Louis XI.,
determined to destroy the almost sovereign power of the great
vassals, took advantage of Count John’s offences against his
government, and resolved on his destruction. He sent an army to
besiege him at Lectoure. At this siege Isabella’s son made his first
essay at arms, and displayed the valor of his race but the young
hero finally perished in a rash sortie, and the count soon after
capitulated. The royal forces, taking possession of the place, basely
violated the terms of surrender. The city was sacked and nearly all
the inhabitants massacred. Among the victims was Count John
himself, who died invoking the Virgin. The walls of the city were
partly demolished, and fire set to the four quarters. The dead were
left unburied, and for two months the wolves that preyed thereon
were the only occupants of the place. Never was there a more
fearful retribution. It took the city nearly a century to recover in a
measure from this horrible calamity.
Lectoure was in the hands of the Huguenots when Monluc laid
siege to it in 1562. Bremond, the commander, offered to capitulate,
and, proposing an exchange of hostages, he asked for Verduzan, La
Chapelie, and a third. Monluc consented, and as they approached
the gates of the city they were fired upon by thirty or forty
arquebusiers, but without effect. Monluc cried out that was not the
fidelity of an honest man, but of a Huguenot. Bremond protested his
innocence of the deed, and, pretending to seize one of the guilty
men, he hung an innocent Catholic on the walls in sight of Monluc.
Unaware of the fraud, the hostages again approached, and again
they were fired upon. A gentleman from Agen was killed and others
wounded. Indignant at such treachery, and supposing his own life
particularly aimed at, Monluc exclaimed that, since they held their
promises so lightly, he would do the same with his, and he
immediately sent Verduzan with a company of soldiers to Terraube
to despatch the prisoners whose lives he had spared. This order was
executed with as much exactness as barbarity, and the implacable
Monluc declared he had made “a fine end of some very bad fellows.”
Bremond, urged by the inhabitants, again renewed negotiations,
and finally surrendered the city on condition of being allowed to
withdraw with his troops to Bearn, flags flying and drums beating,
and the Protestants left in the place permitted the free exercise of
their religion—terms that were faithfully kept by Monluc.
It was probably the sympathy of Lectoure with the Huguenot party
that led Charles IX. to deprive it of many of its ancient rights and
privileges, which hastened its decline. It put on a semblance of its
former grandeur, however, when it received Henry IV. within its
walls, and Anne of Austria with Cardinal Richelieu.
It was in the old historic castle that Richelieu imprisoned the
unfortunate Duc de Montmorency. The people favored his escape,
and sent him a silk ladder in a pâté; but his kindness of heart led to
his destruction. Desirous of saving a servant to whom he was
attached, he took him with him in his attempt to escape. The
servant fell from the ladder, and was wounded. His cry aroused the
guard. Montmorency was taken and soon after beheaded at
Toulouse. The soldiers present at his execution drank some of his
blood, that, infused into their veins, it might impart something of the
valor of so brave a man. He was so beloved by the common people
that the peasantry of Castelnaudry, where he was taken prisoner, are
familiar with his history, and speak of him with admiration and
affection to this day. His wife, an Italian princess, became a
Visitandine nun after his execution.
One cannot visit the old castle of Lectoure, with its thousand
memories, without emotion. It is now a hospital. Charity has taken
the place of brutality and lawless passion. Looking off from the walls
over the pleasant valley below, watered by streams and divided by
long lines of trees, we hear the song of the peaceful laborer instead
of the battle-cry of the olden time, and the lowing of the fawn-
colored Gascon cattle instead of the neighing of war-horses.
Before the castle opens a street that goes straight through the
town, at the further end of which is the parish church of S. Gervais,
a fine, spacious edifice of the Saxo-Gothic style, built by the English
during their rule. The immense square tower was once a fortress,
called the tower of S. Thomas, from which the sentinel signalled the
approach of the enemy. It was formerly surmounted by the highest
steeple in France, but, repeatedly struck by lightning, it was taken
down some years ago by order of the bishop.
The Carmelite nuns at Lectoure have had from time immemorial a
cross of marvellous efficacy, especially in cases of fever. It is of a
style not often met with in France, though common in Spain, where
it is held in great veneration from its miraculous prototype—the
Santa Cruz de Caravaca.
This cross is made of copper, and has two cross-beams, like a
patriarchal cross, with figures in relief on each side, which are
connected with an interesting history. On the top of one side of the
cross is the monogram of Christ, with a crosslet above and the three
nails of the Passion below. The upper cross-beam has a chalice on
the left arm, and on the right the lance that pierced the Sacred
Heart, crossed by a reed with a sponge at the end. In the middle is
an open space for relics.
On the left arm of the lower cross-beam is the scourge and the
lantern that lit the soldiers to the Garden of Olives; on the right is a
ladder; and in the centre the cock crowing on a pillar that extends
up from the foot of the cross, at which is a death’s head.
These are the usual emblems of the Passion, familiar to all; but
the other side is more mysterious. On the upper part is a patriarchal
cross supported by two angels, one on each arm of the upper cross-
beam. Lower down, in the centre of the lower cross-beam, is a priest
in sacerdotal vestments, ready to offer the Holy Sacrifice, standing in
an attitude of astonishment and admiration, looking up at the cross
borne by the two angels. On his breast is the monogram of Christ,
and beneath that of the Virgin. On each side are lilies in full bloom,
and above his head, in the centre of the upper cross-beam, stands a
chalice, as on an altar, covered with the sacred linen veil. It is
evident the artist intended to represent all the objects necessary to
celebrate the Holy Sacrifice of the Mass. There are two lighted
candles at the side of the priest, and at the end of the right arm of
the lower cross-beam are two kings filled with evident amazement,
one of whom is gazing at the angelic apparition. At the left extremity
is a queen and an attendant.
The Cross of Caravaca is associated with a chivalric legend of
southern Spain. We give it as related by Juan de Robles, a priest of
Caravaca, whose account was published at Madrid in 1615.
About the year of our Lord 1227 there reigned at Valencia a
Moorish prince, known in the ancient Spanish chronicles by the
Arabic name of Zeyt Abuzeyt, who embraced Christianity. According
to Zurita, he became King of Murcia and Valencia in 1224, and was
at first a violent persecutor of his Christian subjects. In 1225 he
made peace with Iago, King of Aragon, promising him one-fifth of
the revenues of his two capitals, which enraged his people and
caused him the loss of Murcia. The Moors, discovering he held secret
intercourse with the King of Aragon and the pope, drove him from
Valencia in 1229. He died about 1248, before King Iago took
possession of that city.
Zeyt Abuzeyt’s conversion to Christianity took place in
consequence of a miracle that occurred in his presence at Caravaca,
a town in his kingdom where he happened to be. At that time the
Spanish victories over the Moors announced the speedy expulsion of
the latter from the Peninsula, and frequent conversions took place
among them. A Christian priest ventured among the Moors of the
kingdom of Murcia to preach the Gospel. He was seized and brought
before Zeyt Abuzeyt, who asked him many questions concerning the
Christian religion, and, in particular, about the Sacrifice of the Mass.
The explanations of the priest interested him so much that he
requested him to celebrate the Holy Mysteries in his presence. The
priest, not having the necessary articles, sent for them to the town
of Concha, which was in the hands of the Christians; but it happened
that the cross, which should always be on the altar during the
celebration of Mass, had been forgotten. The priest, not remarking
the deficiency, began the Holy Sacrifice, but, soon observing the
cross was wanting, did not know what to do. The king, who was
present with his family and the court, seeing the priest suddenly turn
pale, asked what had happened. “There is no cross on the altar,”
replied the priest. “But is not that one?” replied the king, who at that
moment saw two angels placing a cross on the altar. The good priest
joyfully gave thanks to God and continued the sacred rites. So
marvellous an occurrence triumphed over the infidelity of Zeyt
Abuzeyt, and he at once professed his faith in Christ. Popular
tradition says he was baptized by the name of Ferdinand, in honor of
the holy king, Ferdinand III., who stood as sponsor. Pope Urban IV.
addressed him a brief of felicitation on account of his baptism.
Zeyt Abuzeyt had one son, who received the name of Vincent
when baptized, and subsequently married a Christian maiden. At the
death of his father he took the title of the King of Valencia, which he
held till the King of Aragon took possession of the city. He then
contented himself with the lands and revenues assigned him by the
conqueror.
This account explains the figures on the Cross of Caravaca. We
see the astonished priest and the cross borne by the angels. The
two kings, who are gazing at the cross, are of course King Zeyt
Abuzeyt and S. Ferdinand, his god-father. The queen opposite is
doubtless Dominica Lopez, whom, according to tradition, he married
after his baptism; and beside her is her daughter, called Aldea
Fernandez in honor of King Ferdinand.
This cross, to which a great number of miracles are attributed, is
preserved with great care in the church at Caravaca, in the ancient
kingdom of Murcia. It is believed to be made of the sacred wood of
the true cross. A great number of similar crosses have since been
made, and there is hardly a family in Spain which has not a Cross of
Caravaca. Many people wear one.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookluna.com

You might also like