A guide to MATLAB for beginners and experienced users 2nd Edition Brian R. Hunt pdf download
A guide to MATLAB for beginners and experienced users 2nd Edition Brian R. Hunt pdf download
https://ebookfinal.com/download/a-guide-to-matlab-for-beginners-and-
experienced-users-2nd-edition-brian-r-hunt/
https://ebookfinal.com/download/essential-matlab-for-engineers-and-
scientists-fourth-edition-brian-hahn/
https://ebookfinal.com/download/practical-guide-to-icp-ms-a-tutorial-
for-beginners-third-edition-robert-thomas/
https://ebookfinal.com/download/avid-editing-a-guide-for-beginning-
and-intermediate-users-3rd-edition-sam-kauffmann/
https://ebookfinal.com/download/avid-editing-fourth-edition-a-guide-
for-beginning-and-intermediate-users-sam-kauffmann/
The IT Support Handbook A How To Guide to Providing
Effective Help and Support to IT Users 2nd Edition Mike
Halsey
https://ebookfinal.com/download/the-it-support-handbook-a-how-to-
guide-to-providing-effective-help-and-support-to-it-users-2nd-edition-
mike-halsey/
https://ebookfinal.com/download/bash-guide-for-beginners-machtelt-
garrels/
https://ebookfinal.com/download/perinatal-mental-health-a-guide-for-
health-professionals-and-users-1st-edition-vivienne-hanley/
https://ebookfinal.com/download/matlab-guide-2nd-edition-desmond-j-
higham/
Brian R. Hunt
Ronald L. Lipsman
Jonathan M. Rosenberg
with
Kevin R. Coombes
John E. Osborn
Garrett J. Stuck
A Guide to MATLAB®
for Beginners and Experienced Users
Second Edition
Brian R. Hunt
Ronald L. Lipsman
Jonathan M. Rosenberg
All of the University of Maryland, College Park
with
Kevin R. Coombes
John E. Osborn
Garrett J. Stuck
cambridge university press
Cambridge, New York, Melbourne, Madrid, Cape Town, Singapore, São Paulo
Cambridge University Press has no responsibility for the persistence or accuracy of urls
for external or third-party internet websites referred to in this publication, and does not
guarantee that any content on such websites is, or will remain, accurate or appropriate.
Contents
Preface page xi
Why We Wrote This Book xi
Who Should Read This Book xii
How This Book Is Organized xii
Conventions Used in This Book xiv
About the Authors xv
1 Getting Started 1
Platforms and Versions 1
Installation 2
Starting MATLAB 2
Typing in the Command Window 3
Online Help 3
MATLAB Windows 6
Ending a Session 6
2 MATLAB Basics 7
Input and Output 7
Arithmetic 8
Recovering from Problems 9
Errors in Input 9
Aborting Calculations 9
Algebraic or Symbolic Computation 10
Substituting in Symbolic Expressions 10
Symbolic Expressions, Variable Precision, and Exact Arith-
metic 11
Vectors and Matrices 12
Vectors 13
Matrices 14
Suppressing Output 15
Functions 15
Built-in Functions 15
User-Defined Functions 16
Managing Variables 17
v
vi Contents
Differentiation 54
Integration 54
Limits 55
Sums and Products 56
Taylor Series 57
Default Variables 57
5 MATLAB Graphics 59
Two-Dimensional Plots 59
Parametric Plots 59
Contour Plots and Implicit Plots 60
Field Plots 62
Three-Dimensional Plots 62
Curves in Three-Dimensional Space 62
Surfaces in Three-Dimensional Space 64
Figure Windows 65
Multiple Figure Windows 66
The Figure Toolbar 66
Combining Plots in One Window 67
✰ Customizing Graphics 67
Annotation 69
Change of Plot Style 70
Full-Fledged Customization 71
✰ Images, Animations, and Sound 73
Images 74
Animations 76
Sound 77
6 MATLAB Programming 85
Branching 85
Branching with if 85
Logical Expressions 87
Branching with switch 91
More about Loops 92
Open-Ended Loops 92
Breaking from a Loop 93
Other Programming Commands 94
Subfunctions 94
Cell and Structure Arrays 94
Commands for Parsing Input and Output 95
Evaluation and Function Handles 97
User Input and Screen Output 98
Debugging 100
viii Contents
8 Simulink 111
A Simple Differential Equation 111
✰ An Engineering Example 115
✰ Communication with the Workspace 120
9 ✰ GUIs 123
GUI Layout and GUIDE 123
Saving and Running a GUI 126
GUI Callback Functions 127
10 Applications 131
Illuminating a Room 132
Mortgage Payments 138
Monte Carlo Simulation 144
Population Dynamics 150
Linear Economic Models 160
Linear Programming 165
The 360◦ Pendulum 172
✰ Numerical Solution of the Heat Equation 175
✰ A Model of Traffic Flow 185
11 Troubleshooting 205
Common Problems 205
Wrong or Unexpected Output 205
Syntax Error 207
Spelling Error 209
Error or Warning Messages When Plotting 209
A Previously Saved M-File Evaluates Differently 210
Computer Won’t Respond 211
The Most Common Mistakes 211
Debugging Techniques 212
Contents ix
Glossary 287
Index 302
Preface
That statement encapsulates the view of The MathWorks, Inc., the developer of MAT-
LAB® . MATLAB 7 is an ambitious program. It contains hundreds of commands to
do mathematics. You can use it to graph functions, solve equations, perform statistical
tests, and much more. It is a high-level programming language that can communicate
with its cousins, e.g., Fortran and C. You can produce sound and animate graphics.
You can do simulations and modeling (especially if you have access not just to basic
MATLAB but also to its accessory Simulink® ). You can prepare materials for export
to the World Wide Web. In addition, you can use MATLAB to combine mathemat-
ical computations with text and graphics in order to produce a polished, integrated,
interactive document.
A program this sophisticated contains many features and options. There are liter-
ally hundreds of useful commands at your disposal. The MATLAB help documenta-
tion contains thousands of entries. The standard references, whether the MathWorks
User’s Guide for the product, or any of our competitors, contain a myriad of tables
describing an endless stream of commands, options, and features that the user might
be expected to learn or access.
MATLAB is more than a fancy calculator; it is an extremely useful and versatile
tool. Even if you know only a little about MATLAB, you can use it to accomplish
wonderful things. The hard part, however, is figuring out which of the hundreds of
commands, scores of help pages, and thousands of items of documentation you need
to look at to start using it quickly and effectively.
That’s where we come in.
xi
xii Preface
reading this book, you will be able to use MATLAB effectively. You’ll also be ready
to explore more of MATLAB on your own.
You might not be a MATLAB expert when you finish this book, but you will be
prepared to become one – if that’s what you want. We figure you’re probably more
interested in being an expert at your own specialty, whether that’s finance or physics,
psychology or engineering. You want to use MATLAB the way we do, as a tool.
This book is designed to help you become a proficient MATLAB user as quickly as
possible, so you can get on with the business at hand.
various MATLAB windows you will encounter, and how to exit the application.
Chapter 2, MATLAB Basics, shows you how to do elementary mathematics using
MATLAB. This chapter contains the most essential MATLAB commands.
Chapter 3, Interacting with MATLAB, contains an introduction to the MATLAB
Desktop interface. This chapter will introduce you to the basic window features of
the application, to the small program files (M-files) that you will use to make the most
effective use of the software, and to a few methods for presenting the results of your
MATLAB sessions. After completing this chapter, you’ll have a better appreciation
of the breadth described in the quote that opens this Preface.
Practice Set A, Algebra and Arithmetic, contains some simple problems for prac-
ticing your newly acquired MATLAB skills. Solutions are presented at the end of the
book.
Chapter 4, Beyond the Basics, contains an explanation of some of the finer points
that are essential for using MATLAB effectively.
Chapter 5, MATLAB Graphics, contains a more detailed look at many of the MAT-
LAB commands for producing graphics.
Practice Set B, Calculus, Graphics, and Linear Algebra, gives you another chance
to practice what you’ve just learned. As before, solutions are provided at the end of
the book.
Chapter 6, Programming, introduces you to the programming features of MAT-
LAB. This chapter is designed to be useful both to the novice programmer and to the
experienced Fortran or C programmer.
Chapter 7, Publishing and M-Books, contains an introduction to the word-pro-
cessing and desktop-publishing features available in MATLAB 7, either using M-files
and the publish command or else combining MATLAB with Microsoft Word.
Chapter 8, Simulink, describes the MATLAB companion software Simulink, a
graphically oriented package for modeling, simulating, and analyzing dynamical sys-
tems. Many of the calculations that can be done with MATLAB can be done equally
well with Simulink. If you don’t have access to Simulink, you may skip Chapter 8.
Chapter 9, GUIs, contains an introduction to the construction and deployment of
Graphical User Interfaces, that is GUIs, using MATLAB. This chapter is a little more
advanced than most of the others.
Chapter 10, Applications, contains examples, from many different fields, of solu-
tions of real-world problems using MATLAB and/or Simulink.
Practice Set C, Developing Your MATLAB Skills, contains practice problems whose
solutions use the methods and techniques you learned in Chapters 6–10.
Chapter 11, Troubleshooting, is the place to turn when anything goes wrong.
Many common problems can be resolved by reading (and rereading) the advice in
this chapter.
Next, we have Solutions to the Practice Sets, which contains solutions to all the
problems from the three Practice Sets. The Glossary contains short descriptions (with
examples) of many MATLAB commands and objects. Though it is not a complete
reference, the Glossary is a handy guide to the most important features of MATLAB.
Finally, there is a comprehensive Index.
xiv Preface
Selectable menu items (from the menu bars in the MATLAB Desktop, figure win-
dows, etc.) are typeset in a boldface font. Submenu items are separated from menu
items by a colon, as in File:Open.... Labels such as the names of windows and buttons
are quoted, in a “regular” font. File and folder names, as well as web addresses, are
printed in a typewriter font. Finally, names of keys on your computer keyboard
are set in a SMALL CAPS font.
We use six special symbols throughout the book. Here they are, together with
their meanings.
☞ Paragraphs like this one contain cross-references to other parts of the book,
or suggestions of where you can skip ahead to another chapter.
➯ Paragraphs like this one contain important notes. Our favorite is “Save
your work frequently.” Pay careful attention to these paragraphs.
✓ Paragraphs like this one contain useful tips or point out features of interest in
the surrounding landscape. You might not need to think carefully about them
on a first reading, but they may draw your attention to some of the finer points
of MATLAB if you go back to them later.
✰ Chapters, sections, or problems starting with this symbol are a little more advanced
than the rest of the book, and can be skipped on first reading if you wish.
Symbolic Paragraphs like this discuss features of MATLAB’s Symbolic Math Toolbox,
used for symbolic (as opposed to numerical) calculations. If you are not using the
Symbolic Math Toolbox, you can skip these sections.
Paragraphs like this discuss features of Simulink. If you are not using Simulink,
you can skip these sections.
Incidentally, if you are a student and you have purchased the MATLAB Student
Version, then the Symbolic Math Toolbox and Simulink are automatically included
with your software, along with basic MATLAB.
About the Authors xv
Brian R. Hunt
Ronald L. Lipsman
Jonathan M. Rosenberg
College Park, Maryland
January, 2006
Chapter 1
Getting Started
In this chapter, we will introduce you to the tools you need in order to begin using
MATLAB effectively. These include the following: some relevant information on
computer platforms and software; installation protocols; how to launch MATLAB,
enter commands and use online help; a roster of MATLAB’s various windows; and
finally, how to exit the program. We know you are anxious to get started using MAT-
LAB, so we will keep this chapter brief. After you complete it, you can go immedi-
ately to Chapter 2 to find concrete and simple instructions for using MATLAB to do
mathematics. We describe the MATLAB interface more elaborately in Chapter 3.
✓ We use the word Windows to refer to all flavors of the Windows operating
system. MATLAB 7 (R14) will run on Windows 2000, Windows NT (4.0
and higher), and on Windows XP. MATLAB 7 will not run on Windows 95,
Windows 98, or on Windows ME. However, MATLAB 6.5 (R13) does run on
Windows 98 or Windows ME.
1
2 Chapter 1. Getting Started
Installation
If you intend to run MATLAB, especially the Student Version, on your own computer,
it is quite possible that you will have to install it yourself. You can easily accomplish
this using the product CDs. Follow the installation instructions as you would with
installation of any new software. At some point in the installation you may be asked
which toolboxes you wish to install. Unless you have severe space limitations, we
suggest that you install any that seem of interest to you or that you think you might
use at some point in the future. However, for the purposes of this book, you should be
sure to include the Symbolic Math Toolbox. We also strongly encourage you to install
Simulink, which is described in Chapter 8.
Starting MATLAB
You start MATLAB as you would any other software application. In Windows, you
access it via the Start menu, under a name like MATLAB 7.0 or Student MATLAB.
Alternatively, you may have a desktop icon that enables you to start MATLAB with
a simple double-click. In Linux or UNIX, generally you need only type matlab in
a terminal window, though you may first have to find the bin subdirectory of the
MATLAB installation directory and add it to your path. Or you may have an icon on
your desktop that achieves the task.
However you start MATLAB, you will briefly see a window that displays the
MATLAB logo as well as some product information, and then a MATLAB Desktop
window will launch. That window will contain a title bar, a menu bar, a tool bar
and four embedded windows, one of which is hidden. The largest and most important
window is the Command Window on the right. We will go into more detail in Chap-
ter 3 on the use and manipulation of the other three windows: the Command History
Window, the Current Directory Browser and the Workspace Browser. For now we
concentrate on the Command Window in order to get you started issuing MATLAB
commands as quickly as possible. At the top of the Command Window, you may
see some general information about MATLAB, perhaps some special instructions for
getting started or accessing help, but most important of all, you will see a command
prompt (>> or EDU>>). If the Command Window is “active,” its title bar will be
dark, and the prompt will be followed by a cursor (a blinking vertical line). That
is the place where you will enter your MATLAB commands (see Chapter 2). If the
Command Window is not active, just click in it anywhere. Figure 1.1 contains an
example of a newly launched MATLAB Desktop.
Random documents with unrelated
content Scribd suggests to you:
5. Obedience to the Will of God.—Whatever the Almighty, whom we
love and fear, bids us do, we not only do, but find pleasure in doing.
“To obey is better than sacrifice, and to hearken than the fat of rams.
For rebellion is as the sin of witchcraft, and stubbornness is as
iniquity and idolatry” (1 Sam. xv. 22, 23).
“But this thing commanded I them, saying, Obey my voice, and I will
be your God, and ye shall be my people” (Jer. vii. 23).
“Thy testimonies have I taken as an heritage for ever: for they are
the rejoicing of my heart” (Ps. cxix. 111).
“Sacrifice and offering thou didst not desire; mine [277]ears hast thou
opened; burnt offering and sin offering hast thou not required. Then
said I, Lo, I come with the volume of the book written for me: I delight
to do thy will, O my God: yea, thy law is written within my heart” (Ps.
xl. 7–9).
“Blessed is the man that trusteth in the Lord, and whose hope the
Lord is” (Jer. xvii. 7).
“My flesh and my heart failed; but God is the strength of my heart
and my portion for ever” (Ps. lxxiii. 26).
“I am in a great strait: let us fall now into the hand of the Lord; for his
mercy is great” (2 Sam. xxiv. 14).
“We are bound to bless God in evil even as we bless Him in good
fortune. It is written: ‘And thou shalt love the Lord, thy God, with all
thine heart, and with all thy soul, and with all thy might’ (Deut. vi. 5);
love Him with all thy soul or life—i.e., even though for His sake thou
risk thy life; and with all thy wealth—that is, whatever measure He
metes out to thee, acknowledge with exceeding gratitude” 4 (Mishnah
Berachoth ix. 5).
“I will sing unto the Lord as long as I live; I will sing praise to my God
while I have any being. Let my meditation be sweet unto him: I will
rejoice in the Lord” (Ps. civ. 33, 34).
“Praise ye the Lord: for it is good to sing praises unto our God; for it
is pleasant, and praise is comely” (Ps. cxlvii. 1).
“I will bless the Lord at all times: his praise shall continually be in my
mouth” (Ps. xxxiv. 2).
“O Lord, open my lips; and my mouth shall show forth thy praise”
(Ps. li. 17)
Our desire to please Him whom we love sincerely, our longing for an
opportunity to do what is good in His eyes, ought not to remain
hidden and silent. The sooner and the more frequently we give
expression to these wishes in audible words, the sooner do they
become realised, and the sooner are the promptings of our heart
followed by deeds.
“With my lips have I declared all the judgments of thy mouth” (Ps.
cxix. 13). [281]
“How sweet are thy words unto my palate! yea, sweeter to my mouth
than honey” (Ps. cxix. 103).
“Let my tongue sing of thy word; for all thy commandments are
righteousness” (Ps. cxix. 172).
“Who shall ascend the hill of the Lord? and who shall stand in his
holy place? He that hath clean hands and a pure heart” (Ps. xxiv. 3,
4).
“He shall call upon me, and I will answer him: I will be with him in
trouble; I will deliver him and honour him” (Ps. xci. 15).
“When they have cried unto the Lord in their trouble, he will save
them out of their distresses” (Ps. cvii. 6).
“Because he hath inclined his ear unto me, therefore will I call upon
him as long as I live. When I find trouble and sorrow, then will I call
upon the name of the Lord. When I take the cup of salvation, then
will I call upon the name of the Lord” (Ps. cxvi. 2, 4, 13).
“Even when the edge of the sword touches already a man’s neck,
even then he must not abandon his faith in praying to God” (Babyl.
Talm. Ber. 10a).
“ ‘Hope in the Lord,’ and pray again” (Rabboth, Deuter., chap. ii.).
Our Rabbis teach, “Prayer is good for man both before his fate has
been decreed and after it has been decreed” (Babyl. Talm. Rosh-
hashshanah, p. 16a). But at the same time we are warned against
impatiently expecting and demanding an immediate effect from the
words uttered by our lips, however devoutly they may have been
spoken. Such expectation—denounced in [283]the Talmud as עיון
תפלה5—would indicate our confidence in the wisdom of our petition,
whilst confidence in the wisdom and goodness of God would suggest
that “the Lord will do what is good in his eyes.”
We give expression to our feelings of gratitude towards our
benefactor by acknowledging the fact, that whatever we enjoy, we
are enabled to enjoy through His kindness. The various blessings
formulated by our Sages serve a double purpose: first, they facilitate
the expression of our feelings; secondly, they remind us of the
presence of the Almighty, and of His goodness in providing for us
and all His creatures. From the time we awake in the morning till the
evening when we lie down to sleep, there is not a moment that does
not bring to our knowledge some Divine act of kindness towards us.
In the morning we perceive the benefit of light, in the evening we
have reason to welcome the blessing of repose it brings with it, while
the interval between the two periods constantly reveals to him who
does not wilfully shut his eyes the hand of Him “who is good, and
whose loving-kindness endureth for ever.”
“I will give thanks to thee, for thou hast answered me, and art
become my salvation” (Ps. cxviii. 21).
“I will sacrifice unto thee with the voice of thanks giving” (Jon. ii. 10).
When things happen which are not pleasant to us, which give us
pain and sorrow, we ought to consider that the plans of God are
different from our plans, and His ways from our ways, and what He
wills is better for us than our own wishes. With resignation, without
murmuring, we ought to utter words of praise and thanks to the
Almighty.
“The Lord gave, and the Lord hath taken away; blessed be the name
of the Lord” (Job i. 21).
“Learn to say, ‘Whatever the Almighty does, is done for our good’ ”
(Babyl. Talm. Ber. 60b).
“If ten pray together, the presence of God is with them” (Babyl. Talm.
Ber. 6a).
“ ‘But as for me, my prayer is unto thee, O Lord, in an acceptable
time’ (Ps. lxix. 14): which is the acceptable time? The time of public
worship” (Babyl. Talm. Ber. 8a).
“As for me, this is my covenant with them, saith the Lord: my spirit
that is upon thee, and my words which I have put in thy mouth, shall
not depart out of thy mouth, nor out of the mouth of thy seed, nor out
of the mouth of thy seed’s seed, saith the Lord, from henceforth and
for ever.” (Is. lix., 21)
“And thou shalt teach them diligently unto thy children, and shalt talk
of them when thou sittest in thine house, and when thou walkest by
the way, and when thou liest down and when thou risest up” (Deut.
vi. 7).
“Happy are we! how goodly is our portion, and how pleasant is our
lot, and how beautiful our heritage! Happy are we who early and late,
morning and [287]evening, twice every day, declare, ‘Hear, O Israel,
the Lord is our God, the Lord is One’!” (Daily Prayers, Morning
Service).
Rabbi Jose teaches, “Let all thy deeds be in the service of heaven,”
כל מעשיך יהיו לשם שמים(Sayings of the Fathers, ii. 12).
The feeling of love and fear of God which fills our [289]heart and soul,
and to which we frequently give expression in words, must also be
visible in our actions. Our whole life must be devoted to His service,
and ought to be one continuous worship of God. Every act of ours
must aim at the sanctification of His name. He has revealed unto us
His Will, and shown us the way in which we should walk;
unconditional submission to His guidance and strict obedience to His
command should distinguish the people of the Lord. True love of
God and faith in His goodness make us “bold as a leopard, light as
an eagle, swift as a stag, and strong as a lion to carry out the will of
our Father in heaven” (Sayings of the Fathers, v. 20). For what could
be the value of our professions of love for God, if we refused to listen
attentively to His voice, to walk in the way He has prepared for us, or
to observe His statutes? From this point of view we may consider all
our duties as duties towards God, since their fulfilment implies
obedience to His Will. But there are certain duties which chiefly or
exclusively concern our relations to God. Such duties are: the
observance of Sabbath and Festivals, providing reminders of God’s
Presence, establishing and supporting Public Worship, sanctifying
God’s Name (קדוש השם), and imitating His ways. Of these duties, the
first three will be fully treated in special sections.
Imitating the Ways of God.—We know that God is perfect, and that
all His ways are perfect; we are conscious also of our weakness and
of the impossibility of ever becoming perfect. But this conviction must
not deter us from seeking perfection as far as our nature permits it,
or from setting before us the ways of God as an example for us to
follow, as the aim which should direct the course of our life, the
balance in which to weigh our actions, and the test by which to
determine their value.
“Ye shall be holy; for I, the Lord your God, am holy” (Lev. xix. 2).
“ ‘Ye shall walk after the Lord your God’ (Deut. xiii. 5). Is it possible
for man to walk after the Lord? Has it not been said, ‘The Lord thy
God is a consuming fire’? (ibid. iv. 24). The meaning of the verse,
however, is this: Follow the ways of God: He clothes the naked, as
we are told, ‘And the Lord God [291]made coats of skin for Adam and
his wife’ (Gen. iii. 21); do the same. He visits the sick, as is indicated
in the words, ‘And God appeared to him in the plain of Mamre’ (ibid.
xviii. 1); you must also visit the sick. He comforts the mourners, as
appears from the passage, ‘And it came to pass after the death of
Abraham, that God blessed his son Isaak’ (ibid. xxv. 11); do the
same, and comfort mourners,” &c. (Babyl. Talm. Sotah 14a).
“Have we not all one father? hath not one God created us?” (Mal. ii.
10). “Thou shalt love thy fellow-man as thyself” (Lev. xix. 18). These
are the sentiments which, according to the Will of God, ought to
guide us in our relation to our fellow-men. When, therefore, a Gentile
came to Hillel and asked him to explain to him in one moment the
duties which Judaism enjoins on its adherents, he replied, “What is
displeasing to thee, that do thou not to others. This is the text of the
Law; all the rest is commentary; go and learn” (Babyl. Talm.
Shabbath 31a). In a different form this idea has been expressed by
Rabbi Akiba and by Ben-Azai, who respectively quoted as a
fundamental principle of the Law, “Love thy neighbour as thyself,”
and “This is the book of the generations of man; in the day that God
created man, he made him in the likeness of God” (Yalkut on Gen. v.
1).
From this principle we derive the following general maxims with
regard to our neighbour’s (1) life and health, (2) property, (3) honour,
and (4) well-being:—
The(1.)
taking of the life of a fellow-man by violent means.
The(2.)
doing of anything by which the health, the peace,
and the well-being of our fellow-man is undermined.
The(3.)
omission of any act in our power to save our fellow-
man from direct or indirect danger of life.
By theft
(1.) and robbery, or
By any
(2.) kind of fraud and dishonesty.
Our Sages teach: “Let the property of thy fellow-man be as dear to
thee as thine own” (Aboth ii. 12); i.e., you do not like to see your own
property damaged, diminished, or destroyed; so it would be wrong if
you were to cause loss and ruin to your fellow-man, whether you did
it directly or indirectly. 8 Let every [294]one enjoy the labour of his
hands; partake of the gifts of the earth and the Divine blessings as
much as his physical and mental powers enable him to do in a
righteous manner.
There are transactions which are legal and do not involve any
breach of the law, and which are yet condemned by the principles of
morality as base and disgraceful. Such are all transactions in which
a person takes advantage of the ignorance or embarrassment of his
neighbour for the purpose of increasing his own property. Usurers
frequently belong to this low and heartless class of society. The
worst thing, however, they do is, that they plan the ruin of others; in
many cases they bring about disaster by inducing young and
inexperienced persons to borrow money and to spend it in luxuries,
or increase the embarrassment of the distressed by charging
exorbitant interest and imposing cruel conditions, which make it
impossible for those who have once fallen into the hands of usurers
to free themselves from their bondage. [295]
An exception from this law was made for the benefit of the stranger.
The inhabitants of a town or a country who lived in the midst of their
relatives, friends, and countrymen could, as a rule, be trusted to
[296]return the loan in due time. If they were not known themselves,
they could find persons who would recognise them or even offer
themselves as security for them. It was different with the stranger
(הנכרי) “who came from a far land” (Deut. xxix. 21); he was not
known; he was, as a rule, without friends; he had none to offer
security for him. 10 When in need, therefore, he would be unlikely to
obtain a loan, if the lender were not permitted in such cases to take
interest as compensation for risking the capital itself. The same
reason explains also a second exception made in the law with regard
to a stranger when a debtor. The payment of old debts is, as a rule, a
great hardship to the insolvent, especially at a time when the benefit
derived from the loan has already been forgotten. It was therefore
ordained that every seven years a remission of all debts should take
place. The debtor that lived in the country could easily be urged or
forced to pay his debts, and the creditor could safely expect that he
would receive his money before the year of release began. This was
not the case with the stranger, who might with impunity keep out of
sight for some time before the beginning of the seventh year: a
circumstance that increased the uncertainty of the repayment, and
would have rendered it almost impossible for a stranger to enjoy the
benefit of a loan in times of temporary embarrassment, but for the
exception made in his case from the law commanding the remission
of all debts in the seventh year. [297]
Our Sages are very severe against those who attack the honour of
their fellow-men. In one passage it is said: “Whoever causes by
offensive words the face of his fellow-man to turn pale is almost
guilty of shedding blood” (Babyl. Talm. B. Metsia 58b). Another
passage runs thus: “Rather let a man throw himself into a furnace
than publicly offend his fellow-man” (ibid. 59a).
The Law does not only forbid the utterance of evil reports, but also
the encouragement given to the tale-bearer by listening to his
stories. “Thou shalt not take up a false report” (Exod. xxiii. 1). In the
Book of Proverbs the evil consequences of listening to slander are
thus depicted: “If a ruler hearkeneth to falsehood, all his servants are
wicked” (Prov. xxix. 12). “He who giveth heed to wicked lips causeth
evil-doing; he who giveth ear to a mischievous tongue feedeth lies”
(ibid. xvii. 4).
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.
ebookfinal.com