100% found this document useful (4 votes)
22 views

Elementary mathematical and computational tools for electrical and computer engineers using MATLAB 2nd ed Edition Manassah download

Ebook download

Uploaded by

hoyeraloialx
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 (4 votes)
22 views

Elementary mathematical and computational tools for electrical and computer engineers using MATLAB 2nd ed Edition Manassah download

Ebook download

Uploaded by

hoyeraloialx
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/ 81

Elementary mathematical and computational tools

for electrical and computer engineers using


MATLAB 2nd ed Edition Manassah download

https://ebookgate.com/product/elementary-mathematical-and-
computational-tools-for-electrical-and-computer-engineers-using-
matlab-2nd-ed-edition-manassah/

Get Instant Ebook Downloads – Browse at https://ebookgate.com


Get Your Digital Files Instantly: PDF, ePub, MOBI and More
Quick Digital Downloads: PDF, ePub, MOBI and Other Formats

MATLAB for Engineers 2nd Edition Holly Moore

https://ebookgate.com/product/matlab-for-engineers-2nd-edition-
holly-moore/

Analysis and Design of Control Systems Using MATLAB 2nd


ed Edition Dukkipati

https://ebookgate.com/product/analysis-and-design-of-control-
systems-using-matlab-2nd-ed-edition-dukkipati/

Introduction to Computational Modeling Using C and Open


Source Tools Garrido

https://ebookgate.com/product/introduction-to-computational-
modeling-using-c-and-open-source-tools-garrido/

Computational Colour Science using MATLAB 1st Edition


Professor Stephen Westland

https://ebookgate.com/product/computational-colour-science-using-
matlab-1st-edition-professor-stephen-westland/
MATLAB for Control Engineers Katsuhiko Ogata

https://ebookgate.com/product/matlab-for-control-engineers-
katsuhiko-ogata/

Essential MATLAB for Scientists and Engineers Second


Edition Brian Hahn

https://ebookgate.com/product/essential-matlab-for-scientists-
and-engineers-second-edition-brian-hahn/

Mathematical tools 1st ed Edition Franklin Coyle

https://ebookgate.com/product/mathematical-tools-1st-ed-edition-
franklin-coyle/

Mathematical Physics Applied Mathematics for Scientists


and Engineers 2nd Edition Bruce R. Kusse

https://ebookgate.com/product/mathematical-physics-applied-
mathematics-for-scientists-and-engineers-2nd-edition-bruce-r-
kusse/

MATLAB for control system engineers Second Edition


Dukkipati

https://ebookgate.com/product/matlab-for-control-system-
engineers-second-edition-dukkipati/
7425_C000.qxd 6/9/06 16:53 Page i

ELEMENTARY
MATHEMATICAL and
COMPUTATIONAL TOOLS
for ELECTRICAL and
COMPUTER ENGINEERS
USING MATLAB®
Second Edition
7425_C000.qxd 6/9/06 16:53 Page ii
7425_C000.qxd 6/9/06 16:53 Page iii

ELEMENTARY
MATHEMATICAL and
COMPUTATIONAL TOOLS
for ELECTRICAL and
COMPUTER ENGINEERS
USING MATLAB®
Second Edition

Jamal T. Manassah

Boca Raton London New York

CRC is an imprint of the Taylor & Francis Group,


an informa business
7425_C000.qxd 6/9/06 16:53 Page iv

MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not
warrant the accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB®
software or related products does not constitute endorsement or sponsorship by The MathWorks of a
particular pedagogical approach or particular use of the MATLAB® software.

CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742

© 2007 by Taylor & Francis Group, LLC


CRC Press is an imprint of Taylor & Francis Group, an Informa business

No claim to original U.S. Government works


Printed in the United States of America on acid-free paper
10 9 8 7 6 5 4 3 2 1

International Standard Book Number-10: 0-8493-7425-1 (Hardcover)


International Standard Book Number-13: 978-0-8493-7425-8 (Hardcover)

This book contains information obtained from authentic and highly regarded sources. Reprinted material
is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable
efforts have been made to publish reliable data and information, but the author and the publisher cannot
assume responsibility for the validity of all materials or for the consequences of their use.

No part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic,
mechanical, or other means, now known or hereafter invented, including photocopying, microfilming,
and recording, or in any information storage or retrieval system, without written permission from the
publishers.

For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC) 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the
CCC, a separate system of payment has been arranged.

Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are
used only for identification and explanation without intent to infringe.

Library of Congress Cataloging-in-Publication Data

Manassah, Jamal T.
Elementary mathematical and computational tools for electrical and computer
engineers using MATLAB / Jamal T. Manassah. -- 2nd ed.
p. cm.
Includes bibliographical references and index.
ISBN-13: 978-0-8493-7425-8 (alk. paper)
ISBN-10: 0-8493-7425-1 (alk. paper)
1. Electric engineering--Mathematics. 2. Computer science--Mathematics. 3.
MATLAB. I. Title.

TK153.M362 2007
510.2’46213--dc22 2 006018608

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
7425_C000.qxd 6/9/06 16:53 Page v

Author

Jamal T. Manassah has been a professor of electrical engineering at the City


College of New York since 1981. He earned his B.Sc. degree in physics from
the American University of Beirut, and his M.A. and Ph.D. in theoretical
physics from Columbia University. Dr. Manassah was a member of the
Institute for Advanced Study. His current research interests are in theoretical
and computational quantum and nonlinear optics, and in photonics.
7425_C000.qxd 6/9/06 16:53 Page vi
7425_C000.qxd 6/9/06 16:53 Page vii

Preface to the First Edition

This book is mostly based on a series of notes for a primer course in electrical
and computer engineering that I taught at the City College of New York
School of Engineering. Each week, the class met for an hour of lecture and a
three-hour computer laboratory session where students were divided into
small groups of 12 to 15 students each. The students met in an informal learn-
ing community setting, a computer laboratory, where each student had the
exclusive use of a PC. The small size of the groups permitted a great deal of
individualized instruction, which was a key ingredient to cater successfully
to the needs of students with heterogeneous high school backgrounds.
A student usually takes this course in the second semester of his or her
freshman year. Typically, the student would have completed one semester of
college calculus, and would be enrolled in the second course of the college
calculus sequence and in the first course of the physics sequence for students
in the physical sciences and engineering.
My purpose in developing this book is to help bring the beginner engi-
neering student’s analytical and computational skills to a level of competency
that would permit him or her to participate, enjoy, and succeed in subsequent
electrical and computer engineering courses. My experience indicates that the
lack of mastery of fundamental quantitative tools is the main impediment to
a student’s progress in engineering studies.
The specific goals of this book are:

1. To make you more comfortable applying the mathematics and


physics that you learned in high school or in college courses,
through interactive activities.
2. To introduce you, through examples, to many new practical tools of
mathematics, including discrete variables material that is essential to
your success in future electrical engineering courses.
3. To instruct you in the use of a powerful computer program,
MATLAB®, which was designed to be simultaneously user-friendly
and powerful in tackling efficiently the most demanding problems
of engineering and sciences.
4. To give you, through the applications and examples covered,
glimpses of some of the fascinating problems that an electrical or
computer engineer solves in the course of completing many of his
or her design projects.

My experience indicates that you can achieve the above goals through the
following work habits that I usually recommend to my own students:

● Read carefully the material from this book that is assigned to you
by your instructor for the upcoming week, and make sure to solve
7425_C000.qxd 6/9/06 16:53 Page viii

the suggested preparatory exercises in advance of the weekly


lecture.
● Attend the lecture and follow closely the material presented, in par-
ticular the solutions to the more difficult preparatory exercises and
the demonstrations.
● Following the lecture, make a list of questions on the preparatory
material to which you still seek answers, and ask your instructor
for help and clarification on these questions, preferably in the first
30 minutes of your computer lab session.
● Complete the in-class exercises during the computer lab session. If
you have not finished solving all in-class exercises, make sure you
complete them on your own, when the lab is open, or at home if you
own a computer, and certainly before the next class session, along
with the problems designated in the book as homework problems
and assigned to you by your instructor.

In managing this course, I found it helpful for both students and instructors
to require each student to solve all problems in a bound notebook. The advan-
tage to the student is to have easy access to his or her previous work, personal
notes, and reminders that he or she made as the course progressed. The advan-
tage to the instructor is to enhance his or her ability to assess, more easily and
readily, an individual student’s progress as the semester progresses.
This book may be used for self-study by readers with perhaps a little more
mathematical maturity acquired through a second semester of college calcu-
lus. The advanced reader of this book who is familiar with numerical meth-
ods will note that, in some instances, I did not follow the canonical order for
the sequence of presentation of certain algorithms, thus sacrificing some opti-
mality in the structure of some of the elementary programs included. This
was necessitated by the goal I set for this book, which is to introduce both
analytical and computational tools simultaneously.
The sections of this book that are marked with asterisks include material
that I assigned as projects to students with either strong theoretical interest
or more mathematical maturity than a typical second semester freshman
student. Although incorporated in the text, they can be skipped in a first
reading. I hope that, by their inclusion, I will facilitate to the interested
reader a smooth transition to some new mathematical concepts and compu-
tational tools that are of particular interest to electrical engineers.
This text greatly benefited from course material previously prepared by
my colleagues in the departments of electrical engineering and computer
science at City College of the City University of New York, in particular,
P. Combettes, I. Gladkova, B. Gross, and F. Thau. They provided either the start-
ing point for my subsequent efforts in this course, or the peer critique for the
early versions of this manuscript. I owe them many thanks and, of course, do
not hold them responsible for any of the remaining imperfections in the text.
The preparation of this book also owes a lot to my students. Their ques-
tions and interest in the material contributed to many modifications in the
7425_C000.qxd 6/9/06 16:53 Page ix

order and in the presentation of the different chapters. Their desire for work-
ing out more applications led me to expand the scope of the examples and
exercises included in the text. I am grateful to all of them. I am also grateful
to Erwin Cohen, who introduced me to the fine team at CRC Press, and to
Jerry Papke whose stewardship of the project from start to end at CRC Press
was most supportive and pleasant. The editorial and production teams at
CRC in particular, Samar Haddad, the project editor, deserve credit for the
quality of the final product rendering. Naomi Fernandes and her colleagues
at The MathWorks Inc. kindly provided me with a copy of the new release
of MATLAB for which I am grateful.
I dedicate this book to Azza, Tala, and Nigh whose support and love
always made difficult tasks a lot easier.
Jamal T. Manassah
New York, January 2001
7425_C000.qxd 6/9/06 16:53 Page x
7425_C000.qxd 6/9/06 16:53 Page xi

Preface to the Second Edition

Comments received from readers and my own students invariably sug-


gested the desirability for expanding Chapter 1 in a manner that will reduce
the need to refer as often to the MATLAB® online help or to a MATLAB user
manual. It was also suggested that the reference value of this book might be
enhanced if a chapter on symbolic manipulation with MATLAB was added.
This second edition is responsive to both of these requests.
The MATLAB syntax was also updated to conform to the current version
of MATLAB. I have also added a number of special sections designated to
the more advanced students or for those students seeking additional chal-
lenges. Typically, these sections were assigned to outstanding students who
supplemented the regular course homework with special assignments. The
continuous need to challenge these gifted students is specially rewarding
when teaching in an urban university where many promising future scien-
tific talents are discovered only after these students are enrolled in college-
level courses.
Now that my modest experiment with introducing an integrated, empiri-
cal, and interdisciplinary style to teaching beginner engineering students
applied mathematics is approximately 10 years in progress, it may be useful
to reflect on the successes and failures of this particular effort:

• Almost everybody in my academic circle now recognizes the use-


fulness of supplementing and enhancing the regular rigorous stan-
dard mathematical curriculum for engineering students with a
hands-on elementary applied course.
• Those of my colleagues who still prefer to have the different mate-
rial taught in a more compartmentalized manner and at a later
stage of a student career argue that students may not be willing or
able to devote the blocks of time required to integrate the skills that
both the analytical and numerical techniques demand within the
same course. While I accept the premise that my adopted approach
certainly requires a higher level of motivation and time commit-
ment by students, it is also true that students who were willing to
invest the required time in a course based on this text ended up
ready to plunge in more advanced engineering courses much ear-
lier than others. I am particularly gratified by the performance of
those of my students who, following the successful completion of
this text went on to advanced engineering courses and were able to
concentrate and excel in the new engineering material covered
7425_C000.qxd 6/9/06 16:53 Page xii

there while many of their classmates were bogged down acquiring


the computational tools which those selected had already mastered.
• There is still no consensus in my own academic circle as to whether
it is advisable to let students explore through computer experi-
ments new mathematical results prior (or even much prior) to the
formal introduction of the underlying theoretical principles in a
more structured environment. My own observations are that a stu-
dent’s intuitive skills are strongly enhanced by accumulated math-
ematical empirical discovery and experience; however, it will be
probably up to psychologists working in learning theories to come
up with a more definitive answer to the value of an empirical
approach in teaching applied mathematics.
• Teachers who adopted this text successfully informed me that they
incorporated a certain amount of flexibility in different students’
assignments to reflect the different levels of skills present in a nor-
mal student population distribution. My own experience was not
different.

My advice to beginner students of engineering using this text is to take


their time and finish each chapter with its solved examples and suggested
problems before moving on to the next chapter. I do not recommend to the
beginner to merely skim through the core material. The reader will quickly
discover that many computational skills are acquired and internalized best
when developed slowly and cumulatively.
The use of this text as reference material by a number of practicing scien-
tists and engineers is often brought to my attention by some pleasant com-
ments in a faculty meeting, professional conference, or social function. This
encouragement by peers is most appreciated.
This new edition benefited from comments, emails, and letters that I
received from many students, readers, and colleagues. I am grateful for all
those who took the time to make suggestions, point out misprints, and/or
argued the pedagogical approach that I adopted in presenting certain mate-
rial. I owe special thanks to Herman Cummins and Robert Brenart for their
valuable comments on this second edition’s book proposal, and to Allison
Taub, my editor at Taylor & Francis who took the initiative in actively and
enthusiastically championing the publication of a second edition of this text,
and in supporting its preparation at this time. Courtney Esposito and her
colleagues at The MathWorks Inc. continue to provide me with copies of the
most current releases of MATLAB and their supporting documentation for
which I am most grateful. Julie Spadaro, project editor at Taylor & Francis,
assured a quality final product, successfully coordinating production teams
on different continents.
My wife Azza and daughters Tala and Nigh urged me to prepare a second
edition of this book because partially, I suspect, they liked the fact that the
mail folder that I bring home with me every day now had many communi-
cations (even fan letters!) from other than the dozen or so colleagues, friends,
7425_C000.qxd 6/9/06 16:53 Page xiii

and editors who regularly read, comment, and respond to my research


papers. But above all, I know that deep in their hearts they supported me
unconditionally in what they knew was to me a labor of love. To them I
rededicate this book.
Jamal T. Manassah
New York, September 2006
7425_C000.qxd 6/9/06 16:53 Page xiv
7425_C000.qxd 6/9/06 16:53 Page xv

Contents

1. Starting with MATLAB and Exploring Its Graphics


Capabilities ....................................................................................................1
1.1 First Steps ..........................................................................................1
1.2 Basic Algebraic Operations and Functions ..................................2
1.3 Plotting Points ..................................................................................6
1.3.1 Axes Commands ..............................................................8
1.3.2 Labeling a Graph ............................................................9
1.3.3 Plotting a Point in 3-D ....................................................9
1.4 M-files ..............................................................................................10
1.5 MATLAB Simple Programming ..................................................11
1.5.1 The for Iterative Loop ................................................11
1.5.2 if-else-end Structures ............................................12
1.5.3 The while Loop ............................................................15
1.6 Arrays ..............................................................................................16
1.6.1 Array Relational Operations ........................................17
1.6.2 Array Algebraic Operations ........................................18
1.6.3 Combining Arrays Relational and Algebraic
Operations: Alternative Syntax to the if Statement ..19
1.6.4 Plotting Arrays ..............................................................20
1.7 Data Analysis ..................................................................................22
1.7.1 Manipulation of Data ....................................................22
1.7.2 Displaying Data ............................................................24
1.7.3 Normal Distribution ......................................................25
1.8 Parametric Equations ....................................................................27
1.8.1 Definition ........................................................................27
1.8.2 More Examples ..............................................................28
1.8.3 Oscilloscope Graphics ..................................................30
1.9 Polar Plots ......................................................................................32
1.10 3-D Plotting ....................................................................................34
1.10.1 Straight-Edge Geometric Figures ................................34
1.10.2 Parametric Equations for a 3-D Curve ......................38
1.10.3 Plotting a 3-D Surface ..................................................40
1.10.4 Contour: A Powerful Tool for Exploring 2-D
Geometries ......................................................................43
1.11 Animation ......................................................................................48
1.12 Specialized Plots: Velocity, Gradient, etc. ..................................49
1.12.1 Velocity Plots from Parametric Equations ................49
1.12.2 Gradient of a Potential ..................................................50
7425_C000.qxd 6/9/06 16:53 Page xvi

1.13 Printing and Saving Work in MATLAB ....................................52


1.13.1 Printing a Figure ............................................................52
1.13.2 Printing a Program File (Script M-file) ........................54
1.13.3 Converting a MATLAB Graphic into an
Image File ........................................................................54
1.13.4 Saving Values of Variables ............................................54
1.13.5 Loading the Value of a Variable ..................................54
1.13.6 Saving a MATLAB Session ..........................................54
1.13.7 Loading workspace.mat ..........................................54
1.14 MATLAB Commands Review ....................................................55

2. Difference Equations ................................................................................59


2.1 Simple Linear Forms ....................................................................59
2.2 Amortization ..................................................................................61
2.3 An Iterative Geometric Construct: The Koch Curve ................64
2.4 Solution of Linear Constant Coefficients
Difference Equations ....................................................................67
2.4.1 Homogeneous Solution ................................................68
2.4.2 Particular Solution ........................................................70
2.4.3 General Solution ............................................................70
2.5 Convolution-Summation of a First-Order System with
Constant Coefficients ....................................................................74
2.6 General First-Order Linear Difference Equations ....................76
2.7 Nonlinear Difference Equations ..................................................78
2.7.1 Computing Irrational Numbers ..................................78
2.7.2 The Logistic Equation ..................................................79
2.8 Fractals and Computer Art ..........................................................81
2.8.1 Mira’s Model ..................................................................81
2.8.2 Hénon’s Model ..............................................................84
2.9 Generation of Special Functions from Their Recursion
Relations ..........................................................................................86

3. Elementary Functions and Some of Their Uses ..................................89


3.1 Function Files ................................................................................89
3.2 Examples with Affine Functions ................................................91
3.2.1 Application to a Simple Circuit ..................................91
3.2.2 Further Consideration of Figure 3.1 ............................94
3.3 Examples with Quadratic Functions ..........................................95
3.4 Examples with Polynomial Functions ........................................96
3.5 Examples with the Trigonometric Functions ............................99
3.6 Examples with the Logarithmic Function ................................100
3.6.1 Ideal Coaxial Capacitor ..............................................100
3.6.2 The Decibel Scale ........................................................101
3.6.3 Entropy ..........................................................................101
3.7 Examples with the Exponential Function ................................103
3.7.1 Application to a Simple RC Circuit ..........................103
7425_C000.qxd 6/9/06 16:53 Page xvii

3.8 Examples with the Hyperbolic Functions and


Their Inverses ..............................................................................105
3.8.1 Application to the Capacitance of
Two Parallel Wires ......................................................105
3.9 Commonly Used Signal Processing Functions ........................105
3.10 Animation of a Moving Rectangular Pulse ..............................111
3.11 Use of the Function Handle ........................................................112
3.12 MATLAB Commands Review ....................................................114

4. Differentiation, Integration, and Solutions of Ordinary


Differential Equations ............................................................................115
4.1 Limits of Indeterminate Forms ..................................................115
4.2 Derivative of a Function ............................................................117
4.3 Infinite Sums ................................................................................119
4.4 Numerical Integration ................................................................121
4.5 A Better Numerical Differentiator ............................................124
4.5.1 Application ..................................................................127
4.6 A Better Numerical Integrator: Simpson’s Rule ......................128
4.7 Numerical Solutions of Ordinary Differential Equations ......135
4.7.1 First-Order Iterator ......................................................137
4.7.2 Higher-Order Iterators: The Runge–Kutta
Method ..........................................................................142
4.7.3 MATLAB ODE Solvers ................................................146
4.8 Integral Equations ........................................................................152
4.9 MATLAB Commands Review ..................................................158

5. Root Solving and Optimization Methods ..........................................159


5.1 Finding the Real Roots of a Function of One Variable ..........159
5.1.1 Graphical Method ........................................................159
5.1.2 Numerical Methods ....................................................160
5.1.3 MATLAB fzero Built-in Function ..........................167
5.1.4 Application: Zeros of the Zero-Order
Bessel Function ............................................................168
5.2 Roots of a Polynomial ................................................................170
5.3 Optimization Methods for Functions of One Variable ..........171
5.3.1 Graphical Method ........................................................172
5.3.2 Numerical Method: The Golden Section Method ..173
5.3.3 MATLAB fminbnd Built-in Function ......................175
5.4 The Zeros and the Minima of Functions in Two Variables ..178
5.4.1 The MATLAB fsolve Built-in Command ..............178
5.4.2 The MATLAB fminsearch Built-in Command ....181
5.5 Finding the Minima of Functions with
Constraints Present ......................................................................185
5.5.1 Lagrange Multipliers ..................................................186
5.5.2 MATLAB fmincon Built-in Function ......................187
5.6 MATLAB Commands Review ..................................................189
7425_C000.qxd 6/9/06 16:53 Page xviii

6. Complex Numbers....................................................................................191
6.1 Introduction ..................................................................................191
6.2 The Basics ......................................................................................191
6.2.1 Addition ........................................................................192
6.2.2 Multiplication by a Real or Imaginary
Number ........................................................................193
6.2.3 Multiplication of Two Complex Numbers ..............193
6.3 Complex Conjugation and Division ........................................195
6.3.1 Application to Division ..............................................196
6.4 Polar Form of Complex Numbers ............................................197
6.4.1 New Insights into Multiplication and Division
of Complex Numbers ..................................................198
6.4.2 Roots of Complex Numbers ......................................200
6.4.3 The Function y ⫽ e j␪ ....................................................201
6.5 Analytical Solutions of Constant Coefficients ODE ..............204
6.5.1 Transient Solutions ......................................................205
6.5.2 Solution in the Presence of a Source:
Green Function Technique ..........................................207
6.5.3 Steady-State Solutions ................................................210
6.5.4 Applications to Circuit Analysis ................................211
6.6 Phasors ..........................................................................................213
6.6.1 Phasor of Two Added Signals ....................................213
6.6.2 Total Phasor of Many Signals ....................................214
6.7 Interference and Diffraction of Electromagnetic Waves ........216
6.7.1 The Electromagnetic Wave ........................................216
6.7.2 Addition of Two Electromagnetic Waves ................217
6.7.3 Generalization to N-waves ........................................218
6.8 Solving ac Circuits with Phasors: The Impedance
Method ..........................................................................................220
6.8.1 RLC Circuit Phasor Analysis ......................................221
6.8.2 The Infinite LC Ladder ................................................222
6.9 Transfer Function for a Difference Equation with
Constant Coefficients ..................................................................224
6.10 MATLAB Commands Review ..................................................234

7. Vectors ........................................................................................................235
7.1 Vectors in Two Dimensions ........................................................235
7.1.1 Addition ........................................................................235
7.1.2 Multiplication of a Vector by a Real Number ..........235
7.1.3 Cartesian Representation ............................................236
7.1.4 MATLAB Representation of Vectors ........................238
7.2 Dot (or Scalar) Product ..............................................................239
7.2.1 MATLAB Representation of the Dot Product ..........241
7.3 Components, Direction Cosines, and Projections ..................243
7.3.1 Components ..................................................................243
7.3.2 Direction Cosines ........................................................243
7.3.3 Projections ....................................................................244
7425_C000.qxd 6/9/06 16:53 Page xix

7.4 The Dirac Notation and Some General Theorems ..................244


7.4.1 Cauchy–Schwartz Inequality ....................................246
7.4.2 Triangle Inequality ......................................................248
7.5 Cross Product and Scalar Triple Product ................................249
7.5.1 Cross Product ..............................................................249
7.5.2 Geometric Interpretation of the Cross Product ......250
7.5.3 Scalar Triple Product ..................................................250
7.6 Tangent, Normal, and Curvature ..............................................253
7.7 Velocity and Acceleration Vectors in Polar Coordinates ........255
7.8 Line Integral ..................................................................................261
7.9 Infinite-Dimensional Vector Spaces ..........................................263
7.10 MATLAB Commands Review ..................................................272

8. Matrices ......................................................................................................273
8.1 Setting Up Matrices ....................................................................273
8.1.1 Creating a Matrix by Keying in the Elements ........273
8.1.2 Retrieving Special Matrices from the
MATLAB Library ........................................................275
8.1.3 Functional Construction of Matrices ........................277
8.2 Adding Matrices ..........................................................................280
8.3 Multiplying a Matrix by a Scalar ..............................................280
8.4 Multiplying Matrices ..................................................................281
8.5 Inverse of a Matrix ......................................................................282
8.6 Solving a System of Linear Equations ......................................285
8.7 Application of Matrix Methods ................................................288
8.7.1 dc Circuit Analysis ......................................................288
8.7.2 dc Circuit Design ........................................................289
8.7.3 ac Circuit Analysis ......................................................290
8.7.4 Accuracy of a Truncated Taylor Series ....................291
8.7.5 Reconstructing a Function from Its Fourier
Components ..................................................................294
8.7.6 Interpolating the Coefficients of an (n ⫺ 1)-
Degree Polynomial from n Points ............................296
8.7.7 Least-Squares Fit of Data ............................................297
8.7.8 Numerical Solution of Fredholm Equations ............298
8.8 Eigenvalues and Eigenvectors ..................................................299
8.8.1 Finding the Eigenvalues of a Matrix ........................299
8.8.2 Finding the Eigenvalues and Eigenvectors
Using MATLAB ............................................................302
8.9 The Cayley–Hamilton and Other Analytical Techniques ......305
8.9.1 Cayley–Hamilton Theorem ........................................305
dX
8.9.2 Solution of Equations of the Form ⫽ AX ..........306
dt
8.9.3 Solution of Equations of the Form
dX
= AX ⫹ B(t)..............................................................308
dt
7425_C000.qxd 6/9/06 16:53 Page xx

8.9.4 Pauli Spinors ................................................................312


8.10 Special Classes of Matrices ........................................................319
8.10.1 Hermitian Matrices ......................................................319
8.10.2 Unitary Matrices ..........................................................323
8.10.3 Unimodular Matrices ..................................................324
8.11 Transfer Matrices ..........................................................................330
8.12 Covariance Matrices ....................................................................334
8.12.1 Parametric Estimation ................................................336
8.12.2 Karhunen–Loeve Transform ......................................339
8.13 MATLAB Commands Review ..................................................341

9. Transformations ........................................................................................343
9.1 Two-Dimensional Geometric Transformations ......................343
9.1.1 Construction of Polygonal Figures ............................343
9.1.2 Inversion about the Origin and Reflection
about the Coordinate Axes ........................................344
9.1.3 Rotation around the Origin ........................................345
9.1.4 Scaling ............................................................................346
9.1.5 Translation ....................................................................347
9.2 Homogeneous Coordinates ........................................................347
9.3 Manipulation of 2-D Images ......................................................351
9.3.1 Geometrical Manipulation of Images ......................351
9.3.2 Digital Image Processing ............................................352
9.3.3 Encrypting an Image ..................................................353
9.4 Lorentz Transformation ..............................................................355
9.4.1 Space–Time Coordinates ............................................355
9.4.2 Addition Theorem for Velocities ..............................357
9.5 Iterative Constructs ....................................................................358
9.5.1 The Koch Curve ..........................................................358
9.5.2 The Serpenski Curve ..................................................361
9.6 MATLAB Commands Review ..................................................363

10. A Taste of Probability Theory ................................................................365


10.1 Introduction ..................................................................................365
10.2 Basics ..............................................................................................366
10.3 Addition Laws for Probabilities ................................................371
10.4 Conditional Probability ..............................................................375
10.4.1 Total Probability Theorem ..........................................377
10.4.2 Bayes Theorem ............................................................377
10.5 Repeated Trials ............................................................................380
10.6 Generalization of Bernoulli Trials ............................................382
10.7 The Poisson and the Normal Distributions ............................382
10.7.1 The Poisson Distribution ............................................383
10.7.2 The Normal Distribution ............................................385
7425_C000.qxd 6/9/06 16:53 Page xxi

Appendix A: Review of Elementary Functions............................................389


A.1 Affine Functions ..........................................................................389
A.2 Quadratic Functions ....................................................................390
A.3 Polynomial Functions ..................................................................395
A.4 Trigonometric Functions ............................................................395
A.5 Inverse Trigonometric Functions ..............................................397
A.6 The Natural Logarithmic Function ..........................................397
A.7 The Exponential Function ..........................................................398
A.8 The Hyperbolic Functions ..........................................................399
A.9 The Inverse Hyperbolic Functions ............................................401

Appendix B: Determinants ..............................................................................403

Appendix C: Symbolic Calculations with MATLAB ..................................407


C.1 Symbolic Manipulation ..............................................................408
C.1.1 Creating Symbolic Expressions ................................408
C.1.2 Algebraic Manipulation ..............................................411
C.1.3 Plotting Symbolic Expressions ..................................414
C.2 Symbolic Solution of Algebraic and Transcendental
Equations ......................................................................................417
C.3 Symbolic Calculus ......................................................................418
C.4 Symbolic Linear Algebra ............................................................423
C.5 z-Transform and Laplace Transform ........................................428
C.5.1 z-Transform ..................................................................428
C.5.2 Solving Constant Coefficients Linear Difference
Equations Using z-Transform ....................................431
C.5.3 Laplace Transform ......................................................432
C.5.4 Solving Constant Coefficients Linear ODE
Using Laplace Transform ............................................436

Appendix D: Some Useful Formulae ............................................................439

Appendix E: Text Formatting ..........................................................................443

Selected References ..........................................................................................445

Index......................................................................................................................447
7425_C000.qxd 6/9/06 16:53 Page xxii
7425_C001.qxd 9/2/06 12:03 PM Page 1

1
Starting with MATLAB and Exploring Its
Graphics Capabilities

MATLAB can be thought of as a library of programs that will prove very use-
ful in solving many electrical engineering computational problems. MATLAB
is an ideal tool for numerically assisting you in obtaining answers, which is a
major goal of engineering analysis and design. This program is very useful in
research on circuit analysis, device design, signal processing, filter design,
control system analysis, antenna design, microwave engineering, photonics
engineering, computer engineering, and every other subfields of electrical
engineering. It is also a powerful graphic and visualization tool of beneficial
use for both quantitative courses and in your future career. In this chapter, we
start our exploration of MATLAB; in subsequent chapters, we will add to our
knowledge about this powerful tool of the modern engineer.

1.1 First Steps


The first step in using MATLAB is to know how to call it. It is important to
remember that although the front-end and the interfacing for machines with
different operating systems are sometimes different, once you are inside
MATLAB, all programs and routines are written in the same manner. Only
those few commands that are for file management and for interfacing with
external devices such as printers may be different for different operating sys-
tems. After entering MATLAB, usually by double clicking on the MATLAB
program icon, you should see the prompt >>, which means the program
interpreter is waiting for you to enter instructions. The interpreter goes to
work when you press the Return key. In case you wish to go to a new line
for the purpose of continuing your instructions, you should enter ellipses
( … ) before you hit the Return key.
In case the program is already opened, and to make sure that nothing is
saved from a previous session, type and enter:

>>clear all
1
7425_C001.qxd 9/2/06 12:03 PM Page 2

2 Elementary Mathematical and Computational Tools Using MATLAB®

This command removes all variables from the workspace. Also type and
enter (we shall henceforth say just enter):

>>clf

This command creates a graph window (if one does not already exist) or
clears an existing graph window. The command figure creates a new fig-
ure window, leaving the existing ones unaltered.
The command quit stops MATLAB.
Because it is not the purpose of this text to explain the function of every
MATLAB command, how would you get information on a particular syntax?
The MATLAB program has extensive help documentation available with
simple commands. For example, if you wanted help on a function called
roots (we will use this function often), you would type help roots.
Note that the help facility cross-references other functions that may have
related uses. This requires that you know the function name. If you want an
idea of the available help files in MATLAB, type help. This gives you a list
of topics included in MATLAB.
To get help on a particular topic such as elementary matrices and matrix
manipulation, type matlab\elmat. This gives you a list of all relevant
functions pertaining to that area. Now you may type help for any function
listed there. For example, try help size.

1.2 Basic Algebraic Operations and Functions


The MATLAB environment can be used, on the most elementary level, as a
tool to perform simple algebraic manipulations and function evaluations.

EXAMPLE 1.1

Exploring the calculator functions of MATLAB: The purpose of this example


is to show how to manually enter data and how to use the basic algebraic
operations of MATLAB. Note that the statements will be executed immedi-
ately after they are typed and entered (no equal sign is required).
Enter the text that follows the >> prompt to find out the MATLAB
responses to the following:

>> format short


>> 2.54376+2.32e1 %2.32e1=2.32*(10^1)
ans =
25.7438
>> 5.45^2
ans =
7425_C001.qxd 9/2/06 12:03 PM Page 3

Starting with MATLAB® and Exploring Its Graphics Capabilities 3

29.7025
>> ceil(7.58)
ans =
8
>> 2*sin(pi/4)
ans =
1.4142

The % symbol is used so that one can type comments in a program. (Comments
following the % symbol are ignored by the MATLAB interpreter.) Then enter:

>> format short e


>> 2.54376+2.32e1
ans =
2.5744e+001
>> 5.45^2
ans =
2.9703e+001
>> ceil(7.58)
ans =
8
>> 2*sin(pi/4)
ans =
1.4142e+000 ⵧ

The last command gave twice the sine of /4. Note that the argument of the
function was enclosed in parentheses directly following the name of the
function. Therefore, if you wanted to find sin3(x), the proper MATLAB syn-
tax would be

>>sin(pi/4)^3

The numeric functions of MATLAB are:


ceil(x) rounds the number to nearest integer toward 
fix(x) rounds the number to nearest integer toward 0
floor(x) rounds the number to nearest integer toward 
round(x) rounds the number to nearest integer

The numeric formats of MATLAB are:


format short (default value) gives the number with four decimal
digits
format long gives the number with 16 digits
format short e gives the number with four decimals plus an exponent
format long e gives the number with 15 digits plus an exponent
format bank gives the number with 2 digits after the decimal (use-
ful for financial calculations)
7425_C001.qxd 9/2/06 12:03 PM Page 4

4 Elementary Mathematical and Computational Tools Using MATLAB®

To facilitate its widespread use, MATLAB has all the standard elementary
mathematical functions as built-in functions. Type help elfun to obtain a
listing of these functions. Remember that this is just a subset of the available
functions in the MATLAB library.

>>help elfun

The response to the last command will give you a list of these elementary
functions, some of which may be new to you, but all of which will be used
in your future engineering studies. Many of these functions will also be used
in later chapters of this book.
In the following table, the MATLAB expressions for the most common
mathematical functions are given:

MATLAB form Name Mathematical form

sqrt(x) squareroot 兹x
exp(x) exponential exp(x)  ex
log(x) natural logarithm ln(x)
log10(x) base10 logarithm log(x)  (ln(x)/ln(10))
sin(x) sine sin(x)
cos(x) cosine cos(x)
sec(x) secant sec(x)
tan(x) tangent tan(x)  (sin(x)/cos(x))
cot(x) cotangent cot(x)  (1/tan(x))
asin(x) inverse sine sin1(x)  arcsin(x)
acos(x) inverse cosine cos1(x)
asec(x) inverse secant sec1(x)
atan(x) inverse tangent tan1(x)
acot(x) inverse cotangent cot1(x)
sinh(x) hyperbolic sine sinh(x)  (ex  ex)/2
cosh(x) hyperbolic cosine cosh(x)  (ex  ex)/2
sech(x) hyperbolic secant sech(x)  1/cosh(x)
tanh(x) hyperbolic tangent tanh(x)  sinh(x)/cosh(x)
coth(x) hyperbolic cotangent coth(x)  1/tanh(x)
asinh(x) inverse hyperbolic sine (
sinh1 ( x)  ln x  x 2  1 )
where    x  

acosh(x) inverse hyperbolic cosine (


cosh1 ( x)  ln x  x 2  1 )
where x 1
1 1 
asech(x) inverse hyperbolic secant sech1 ( x)  ln   2  1 
x x 
where 0  x  1
1  1 x 
atanh(x) inverse hyperbolic tangent tanh1 ( x)  ln  
2  1 x 
where 1  x  1

1  x 1 
acoth(x) inverse hyperbolic cotangent coth1 ( x) 
ln  
2  x 1 
where x  1 or x  1
7425_C001.qxd 9/2/06 12:03 PM Page 5

Starting with MATLAB® and Exploring Its Graphics Capabilities 5

EXAMPLE 1.2

Assigning and calling values of parameters: In addition to inputting data


directly to the screen, you can assign a symbolic constant or constants to rep-
resent data and perform manipulations on them.
For example, enter and note the answer to each of the following:

>> format short


>> a=2.65;
>> b=3.765;
>> c=a*(a+b)
c =
16.9997
>> d=a*b
d =
9.9772
>> e=a/b
e =
0.7039
>> f=a^3/b^2
f =
1.3128
>> g=a+3*b^2
g =
45.1757

(The spacing shown above is obtained by selecting Compact for Numerical


Display in the Command Window Preferences in the File pull-down menu.)

If we desire at any point to know the list of the current variables in a MATLAB
session, we enter:

>>who

Note on variable names: Variable names must begin with a letter, contains
letters, digits, and underscore characters, and must contain less than 32 char-
acters. MATLAB is case-sensitive.

Question: From the above, can you deduce the order in which MATLAB
performs the basic algebraic operations?

Answer: The order of precedence is as follows:


1. Parentheses, starting with the innermost
2. Exponentiation from left to right
7425_C001.qxd 9/2/06 12:03 PM Page 6

6 Elementary Mathematical and Computational Tools Using MATLAB®

3. Multiplication and division with equal precedence, also evaluated


from left to right
4. Addition and subtraction, with equal precedence, also evaluated
from left to right

IN-CLASS EXERCISE

Pb. 1.1 Using the values, a  0.875 and b  1.5786, find the values of the fol-
lowing expressions (give your answers in the engineering short format):

h  sin(a) sin3/2(b)
j  a1/3 b3/7
k  (sin1(a/b))2/3
l  sinh(a) ab

1.3 Plotting Points


In this section, you will learn how to use some simple MATLAB graphics
commands to plot points. We use these graphics commands later in the text
for plotting arrays and for visualizing their properties. To view all the func-
tions connected with two-dimensional (2-D) graphics, type

>>help plot

All graphics functions connected with three-dimensional curves graphics


can be looked up by typing

>>help plot3

A point P in the x–y plane is specified by two coordinates: the x-coordinate


measures the horizontal distance of the point from the y-axis, while the
y-coordinate measures the vertical distance above or below the x-axis. These
coordinates are called Cartesian coordinates, and any point in the plane can
be described in this manner. We write for the point, P(x, y).
Other representations can also be used to locate a point with respect to a
particular set of axes. For example, in the polar representation, the point is
specified by an r-coordinate that measures the distance of the point from the
origin, while the -coordinate measures the angle which the line passing
through the origin and this point makes with the positive x-axis. The angle
is measured anticlockwise from the positive x-axis.
The purpose of the following two examples is to learn how to represent
points in a Cartesian plane and to plot them using MATLAB.
7425_C001.qxd 9/2/06 12:03 PM Page 7

Starting with MATLAB® and Exploring Its Graphics Capabilities 7

EXAMPLE 1.3

Plot the point P(3, 4). Mark this point with a red asterisk.
Solution: Enter the following:
>> x1=3;
y1=4;
plot(x1,y1,'*r') ⵧ
Note that the semicolon is used in the above commands to suppress the
echoing of the values of the inputs. The '*r' is used to mark the location and
the color of the point that we are plotting.
The symbols for the most common markers and colors for display in
MATLAB plot-functions are:

Markers Symbol Color Symbol

Circle o Blue b
Cross x Cyan c
Diamond d Green g
Dot ⴢ Magenta m
Pentagram p Yellow y
Plus sign ⴙ Red r
Square s White w
Star * Black k

EXAMPLE 1.4

Plot the second point, R(2.5, 4), on the graph while keeping point P of the
previous example on the same graph. Mark the new point with a small green
circle.

Solution: If we went ahead, defined the coordinates of R, and attempted to


plot the point R through the following commands:
>>x2=2.5;
y2=4;
plot(x2,y2,'og')
We would find that the last plot command erases the previous plot output.
Thus, what should we do if we want both points plotted on the same graph?
The answer is to use the hold on command after the first plot.
The following illustrates the instructions that you should have entered
instead of entering the above:
>>hold on
x2=2.5;
y2=4;
plot(x2,y2,'og')
hold off
The hold off turns off the hold on feature. ⵧ
7425_C001.qxd 9/2/06 12:03 PM Page 8

8 Elementary Mathematical and Computational Tools Using MATLAB®

NOTES
1. There is no limit to the number of plot commands you can type
before the hold is turned off.
2. An alternative method for viewing multiple points on the same
graph is available: we may instead, following the entering of the
values of x1, y1, x2, y2, enter:

>>plot(x1,y1,'*r',x2,y2,'og')

This has the advantage, in MATLAB, if no color is specified, that the


program assigns automatically a different color to each point.

1.3.1 Axes Commands


You may have noticed that MATLAB automatically adjusts the scale on a
graph to accommodate the coordinates of the points being plotted. The axis
scaling can be manually enforced by using the command

>>axis([xmin xmax ymin ymax])

Make sure that the minimum axis value is less than the maximum axis value
or an error will result.
In addition to being able to adjust the scale of a graph, you can also change
the aspect ratio of the graphics window. This is useful when you wish to see
the correct x to y scaling. For example, without this command, a circle will look
more like an ellipse, even if we have chosen ymax  ymin  xmax  xmin.

EXAMPLE 1.5

Plot the vertices of the square, formed by the points (1, 1), (1, 1),
(1, 1), (1, 1), keeping the same aspect ratio as in a graph paper, i.e., 1.

Solution: Enter the following:

>>x1=-1;y1=-1;
>>x2=1;y2=-1;
>>x3=-1;y3=1;
>>x4=1;y4=1;
>>plot(x1,y1,'o',x2,y2,'o',x3,y3,'o',x4,y4,'o')
>>axis([-2 2 -2 2])
>>axis square %makes the aspect ratio 1 ⵧ

Note that prior to the axis square command, the square looked like a rect-
angle. If you want to go back to the default aspect ratio, type axis normal.
In specific instances, you may need to choose other than the default
tick marks chosen by MATLAB, you can achieve this by adding the
7425_C001.qxd 9/2/06 12:03 PM Page 9

Starting with MATLAB® and Exploring Its Graphics Capabilities 9

following command:

set(gca,'Xtick',[xmin:dx:xmax],'Ytick',[ymin:dy:ymax])

Here gca stands for get current axes, and dx and dy are respectively the spac-
ings between tick marks that you desire in the x- and y-directions.
You can also make the graph easier to read, by using the command:

>>grid

This command displays gridlines at the tick marks.


If we repeat Example 1.5 with these new features added, the set of instruc-
tions will now read:

>>x1=-1;y1=-1;x2=1;y2=-1;x3=-1;y3=1;x4=1;y4=1;
>>plot(x1,y1,'o',x2,y2,'o',x3,y3,'o',x4,y4,'o')
>>axis([-2 2 -2 2])
>>axis square
>>set(gca,'Xtick',[-2:0.5:2],'Ytick',[-2:0.5:2])
>>grid

The tick marks were chosen in this instance to be separated by –12 units in both
the x- and y-directions.

1.3.2 Labeling a Graph


To add labels to your graph, the functions xlabel, ylabel, and title can
be used as follows:

>>xlabel('x-axis')
>>ylabel('y-axis')
>>title('points in a plane')

If you desire to also add a caption anywhere in the graph, you can use the
MATLAB command

>>gtext('caption')

and place it at the location on the graph of your choice, by clicking the mouse
on the desired location when the crosshair is properly centered there.
Different fonts and symbols can be used in labeling MATLAB graphs.
LaTeX symbols are used by MATLAB for this purpose (see Appendix E).

1.3.3 Plotting a Point in 3-D


In addition to being able to plot points on a plane (2-D space), MATLAB is
also able to plot points in a three-dimensional space (3-D space). For this, we
use the plot3 function.
7425_C001.qxd 9/2/06 12:03 PM Page 10

10 Elementary Mathematical and Computational Tools Using MATLAB®

EXAMPLE 1.6

Plot the points P(1, 1, 1), Q(4, 5, 6) and R(2, 5, 3). Show a grid in your graph.
Solution: Enter the following commands:

>>x1=1;x2=4;x3=2;
>>y1=1;y2=5;y3=5;
>>z1=1;z2=6;z3=3;
>>plot3(x1,y1,z1,'o',x2,y2,z2,'*',x3,y3,z3,'d')
>>axis([0 6 0 6 0 6])
>>grid ⵧ

NOTE You can also plot multiple points in a 3-D space in exactly the same
way as you did on a plane. Axis adjustment can still be used, but the vector
input into the axis command must now have six entries, as follows:

axis([xmin xmax ymin ymax zmin zmax])

You can similarly label your 3-D figure using xlabel, ylabel, zlabel, and
title.
The grid command is also valid in conjunction with the plot3 command.

1.4 M-files
In the last section, we found that to complete a figure with a caption, we had
to enter several commands one by one in the command window. Typing
errors will be time-consuming to fix because if you are working in the com-
mand window, and if you make an error, you will need to retype all or part
of the program. Even if you do not make any mistakes (!), all of your work
may be lost if you inadvertently quit MATLAB and have not taken the nec-
essary steps to save the contents of the important program that you just fin-
ished developing. This will be time-consuming. Especially, if you are
simulating a process, and all that you want to change in successive runs are
the parameters of the problem. To preserve large sets of commands, you can
store them in a special type of file called an M-file.
MATLAB supports two types of M-files: script and function M-files. To hold
a large collection of commands, we use a script M-file. The function M-file is
discussed in Chapter 3. To make a script M-file, you need to open a file using
the built-in MATLAB Menu. First select New from the File menu. Then select
the M-file entry from the pull-down menu. After typing the M-file contents,
you need to save the file. For this purpose, use the save as command from the
File window. A field will pop up in which you can type in the name you have
chosen for this file. In the pop-up lower window, indicate that it is an .m file.
7425_C001.qxd 9/2/06 12:03 PM Page 11

Starting with MATLAB® and Exploring Its Graphics Capabilities 11

NOTES
1. Avoid naming a file by a mathematical abbreviation, the name of a
mathematical function, a MATLAB command, or a number.
2. To run your script M-file, just enter in the command window the
filename omitting the .m extension in the file name at its end at the
MATLAB prompt. To be able to access this file from the command
window, make sure that the folder in which you saved this file is in
the MATLAB Path. If this is not the case use the Set Path in the File
pull-down menu and follow the screen prompts.

EXAMPLE 1.7

For practice, go to the File pull-down menu, select New and M-file to create
the following file that you will name myfile_17.
Enter in the editor window, the following set of instructions:

x1=1;y1=.5;x2=2;y2=1.5;x3=3;y3=2;
plot(x1,y1,'o',x2,y2,'+',x3,y3,'*')
axis([0 4 0 4])
xlabel('xaxis')
ylabel('yaxis')
title('3points in a plane')

After creating and saving this file as myfile_17 in your work folder, go to the
MATLAB command window and enter myfile_17. MATLAB will execute the
instructions in the same sequence as the statements stored in that file. ⵧ

1.5 MATLAB Simple Programming


In this section, we introduce the programming flow control commands for,
if, and while.

1.5.1 The for Iterative Loop


The power of computers lies in their ability to perform a large number of
repetitive calculations. To do this without entering the value of a parameter
or variable each time that these are changed, all computer languages have
control structures that allow commands to be performed and controlled by
counter variables, and MATLAB is no different. For example, the MATLAB
for loop allows a statement or a group of statements to be repeated a pre-
scribed number (i.e., positive integer) of times.
7425_C001.qxd 9/2/06 12:03 PM Page 12

12 Elementary Mathematical and Computational Tools Using MATLAB®

EXAMPLE 1.8

Generate the square of the first ten integers.

Solution: Edit and execute the following script M-file:

for m=1:10
x(m)=m^2;
end ⵧ

In this case, the number of repetitions is controlled by the index variable m,


which takes on the values m=1 to 10 in intervals of 1. Therefore, 10 assign-
ments are made. What the above loop is doing is sequentially assigning the
different values of m^2 (i.e., m2) for each element of the “x-array.” An array
is just a data structure that can hold multiple entries. An array can be 1-D
such as in a vector or 2-D such as in a matrix. More will be said about vec-
tors and matrices in subsequent chapters. At this time, assume 1-D and 2-D
arrays as pigeonholes with numbers or ordered pair of numbers respectively
assigned to them.
To find the value of a particular slot of the array, such as slot 3, enter:

>>x(3)

To read all the values stored in the array, enter:

>>x

Question: What do you get if you enter m, following the execution of the
above program?
Answer: The value 10, which is the last value of m read by the counter.

Homework Problem
Pb. 1.2 A couple establishes a college savings account for their newly
born baby girl, deposit $2000 in this account, and commit themselves to
deposit an equal amount at each future birthday of the new born. They
chose to invest this money with an investment firm that guarantees a
minimum annual return of 5%. What will be the minimum balance of the
account when the young lady turns 18? (Include in your calculation the
amount deposited on her 18th birthday.)

1.5.2 if-else-end Structures


If a sequence of commands must be conditionally evaluated based on a rela-
tional test, the programming of this logical relationship is executed with
some variation of an if-else-end structure.
7425_C001.qxd 9/2/06 12:03 PM Page 13

Starting with MATLAB® and Exploring Its Graphics Capabilities 13

A. The simplest form of this structure is:


if expression
Commands evaluated if expression is True
else
Commands evaluated if expression is False
end

NOTES
1. The commands between the if and else statements are evaluated
for all elements in the expression which are true.
2. The conditional expression uses the Boolean logical symbols &
(AND), | (OR), and ⬃ (NOT) to connect different propositions.

EXAMPLE 1.9

Find for integer a, 0  a  10, the values of C, defined as follows:

 ab for a  5

C 3
 ab for a  5
2

and b  15.

Solution: Edit and execute the following script M-file:

>>b=15;
for a=1:10
if a>5
C(a)=a*b;
else
C(a)=(a*b)*(3/2);
end
end

Check that the values of C that you will obtain by typing C are:

22.5 45 67.5 90 112.50 90 105 120 135 150 ⵧ

B. When there are three or more alternatives for the conditional, the
if-else-end structure takes the form:
if expression 1
Commands 1 evaluated if expression 1 is True
elseif expression 2
Commands 2 evaluated if expression 2 is True
7425_C001.qxd 9/2/06 12:03 PM Page 14

14 Elementary Mathematical and Computational Tools Using MATLAB®

elseif expression 3
Commands 3 evaluated if expression 3 is True
...

....
else
Commands evaluated if no other expression is True
end

In this form, only the commands associated with the first True expression
encountered are evaluated, ensuing relational expressions are not tested.

EXAMPLE 1.10

Find for integers a, 1  a  15, the value of D defined by

 a3 for a  5

D   2a for 5  a  10

 a  7 for 10  a  15

Solution: Edit and execute the following script M-file:

for a=1:15
if a<=5
D(a)=a^3;
elseif a>5 & a<10
D(a)=2*a;
else
D(a)=7+a;
end
end
D ⵧ

Homework Problem
Pb. 1.3 For the values of integer a going from 1 to 10, find the values of
C such that

 a2 if a is even
C
 a
3
if a is odd

Use the stem command to graphically show C. (Hint: Look up in the help
file the function mod.)
7425_C001.qxd 9/2/06 12:03 PM Page 15

Starting with MATLAB® and Exploring Its Graphics Capabilities 15

1.5.3 The while Loop


The while loop is used when the iteration process has to terminate when a
priori specified condition is satisfied. The difference with the for command
is that there the number of iterations is specified in advance.
The syntax for the while loop is as follows:

Initial assignment
while relational condition
expression
end

NOTE Special care should be exercised when using the while loop, as in
some cases the looping may never stop.

EXAMPLE 1.11

The unknown quantity x has the form 2n, where n is an integer. We desire to
find the largest such number subject to the condition that x  75,345.
Solution: Using the above syntax of the while loop, we enter:

>>x=2;
while 2*x<75345
x=2*x;
end
x

The unknown variable is initially assigned the value 2, it has this value until
it encounters the statement x=2*x, which should be read that x(n  1) 
2*x(n), the value of x is then changed to xnew. Before each pass through the
loop, the value of x is checked to see whether x  75,345. If this condition is
satisfied, the next iteration is carried through; otherwise the looping is
stopped. The final result to our problem is the value of x before any more
loop is executed.
If the statement of the problem is changed, and we had asked instead the
question to list all x’s that satisfied the condition x  75,345. We would have
entered instead of the above the following instructions:

>>x=2;
while x<75345
disp(x)
x=2*x;
end

The disp (display) command displays the results of all iterations satisfying
the desired condition. ⵧ
7425_C001.qxd 9/2/06 12:03 PM Page 16

16 Elementary Mathematical and Computational Tools Using MATLAB®

Homework Problem
Pb. 1.4 Using while, find the largest number x which can be written in
the form

x  3n  2n  3

and such that n is an integer and x  35,724.

1.6 Arrays
As mentioned earlier, think of an array as a string of ordered numbers, i.e.,
to determine an array, we need to specify the value and position of each ele-
ment in this string.
As pointed out earlier, an element in the array is addressed by writing the
name of the array followed by the position of the element within parenthe-
ses. For example, x(3) will be the value of the third element in the array x.
The basic array functions are:

length(x) finds the length of the array x (i.e., number of elements)


find(x) computes a new array where the successive elements indicate
the positions where the components of the array x are nonzero
max(x) gives the value of the largest element in the array x
min(x) gives the value of the smallest element in the array x
sum(x) gives the sum of all elements in the array x

EXAMPLE 1.12

Enter the array x  [0 3 6 2 11 0 7 9], and find its third element, length,
nonzero elements, value of its largest and smallest elements, and sum of all
its elements.

Solution:

>> x=[0 3 6 -2 11 0 7 9];


>> x(3)
ans =
6
>> length(x)
ans =
8
>> find(x)
7425_C001.qxd 9/2/06 12:03 PM Page 17

Starting with MATLAB® and Exploring Its Graphics Capabilities 17

ans =
2 3 4 5 7 8
>> max(x)
ans =
11
>> min(x)
ans =
-2
>> sum(x)
ans =
34 ⵧ

1.6.1 Array Relational Operations


MATLAB has six relational operations that compare the elements of two
arrays of the same length.
The relational operators are:

= = equal to
~ = not equal to
< smaller than
<= smaller or equal to
> larger than
>= larger than or equal

If we combine within parentheses the symbols for two arrays with a rela-
tional operator, the result will be a new array consisting of 0’s and 1’s, where
the 1’s are in the positions where the relation between the two elements in
the same position from the two arrays is satisfied, and 0’s otherwise.

EXAMPLE 1.13

Study the following printout:

x = [1 4 7 5 11 2];
y = [3 -2 7 2 12 -4];
>> z1=(x==y)
z1 =
0 0 1 0 0 0
>> z2=(x~=y)
z2 =
1 1 0 1 1 1
>> z3=(x<y)
z3 =
1 0 0 0 1 0
>> z4=(x<=y)
7425_C001.qxd 9/2/06 12:03 PM Page 18

18 Elementary Mathematical and Computational Tools Using MATLAB®

z4 =
1 0 1 0 1 0
>> z5=(x>y)
z5 =
0 1 0 1 0 1
>> z6=(x>=y)
z6 =
0 1 1 1 0 1
>> z7=(z1==z2)
z7 =
0 0 0 0 0 0
>> z8=(z3==z6)
z8 =
0 0 0 0 0 0
>> z9=(z4==z5)
z9 =
0 0 0 0 0 0

Comments: The values of z7, z8, and z9 are identically zeros. This means that
no corresponding elements of z1 and z2, z3 and z6, z4 and z5, respectively are
ever equal, i.e., each pair represents mutually exclusive conditions. ⵧ

1.6.2 Array Algebraic Operations


In Section 1.5, we used for loops repeatedly. However, this kind of loop-
programming is very inefficient and must be avoided as much as possible in
MATLAB. In fact, ideally, a good MATLAB program will always minimize
the use of loops because MATLAB is an interpreted language — not a com-
piled one. As a result, any looping process is very inefficient. Nevertheless,
at times we use the for loops, when necessitated by pedagogical reasons.
To understand array operations more clearly, consider the following:
a=1:3 % a starts at 1, goes to 3 in increments of 1.
If the increment is not 1, you must specify the increment; for example,

b=2:0.2:6 % b starts at 2 ends at 6 in steps of 0.2

To distinguish arrays operations from either operations on scalars or on


matrices, the symbol for multiplication becomes .*, that of division ./,
and that of exponentiation .^. Thus, for example,

c=a.*b % takes every element of a and multiplies


% it by the element of b in the same array location

Similarly, for exponentiation and division:

d=a.^b
e=a./b
7425_C001.qxd 9/2/06 12:03 PM Page 19

Starting with MATLAB® and Exploring Its Graphics Capabilities 19

If you try to use the regular scalar operations symbols, you will get an error
message.
Note that array operations such as the above require the two arrays to
have the same length (i.e., the same number of elements). To verify that two
arrays have the same number of elements (dimension), use the length com-
mand. The exception to the equal length arrays rule is when one of the
arrays is a scalar constant.

NOTE The expression x=linspace(0,10,200) is also a generator for an


x-array. Its first element equal to 0, its last element equal to 10, and it has 200
equally spaced points between 0 and 10. Here, the number of points rather
than the increment is specified; that is, length(x)=200.

1.6.3 Combining Arrays Relational and Algebraic Operations: Alternative


Syntax to the if Statement
As an alternative to the if syntax, we can use a combination of arrays rela-
tional and algebraic operations to generate a complicated array from a sim-
ple one.

EXAMPLE 1.14

Using array operations, find for integers a, 1  a  15, the value of D defined by

 a4 for a  5

D   2a for 5  a  10

 a  7 for 10  a  15

Solution:
>>a=1:15;
D=(a.^4).*(a<=5)+2*a.*(5<a).*(a<10)+(a+7).*(10<=a)...
.*(a<=15) ⵧ
NOTE We have used in the above the property that the logical AND link-
ing two separate relational operations can be represented by the array prod-
uct of these relations.

Homework Problem
Pb. 1.5 The array n is all integers from 1 to 110. The array y is defined by

 n
1/ 2
if n divisible by 3, 5, or 7
y=
 0 otherwise

Find the value of the sum of the elements of y.


7425_C001.qxd 9/2/06 12:03 PM Page 20

20 Elementary Mathematical and Computational Tools Using MATLAB®

1.6.4 Plotting Arrays


If we are given two arrays x and y, we can plot the y-array as function of the
x-array. What MATLAB is actually doing is displaying all the points
P(xi, yi) and connecting each two consecutive points by a straight line.
The same options for markers and color that were available for plotting
points and described earlier are also valid in this case. Additionally, we can
specify here the style of the line that connects the different points.

Style MATLAB Symbol

Solid line –
Dashed line ––
Dash-dot line –.
Dotted line :

If the points are close together, the points will look connected by a continu-
ous line making a smooth curve; we say that the program graphically inter-
polated the discrete points into a continuous curve.
The commands for labeling, axis and tick marks used in plotting points are
also valid here. We can zoom to a particular region of the graph by using the
command zoom, And we can read off the coordinates of particular point(s)
in the graph, by using

[x,y]=ginput(n)

This command serves to read the values of the coordinates of points off a dis-
played graph (n is the number of points). The command pops out the
crosshair. The operator manually zeros on the points of interest and clicks. As
a result, MATLAB prints the coordinates of the points in the same order as
those of the clicks of the mouse.

EXAMPLE 1.15

The three arrays x, y, and z are defined as follows:

x  0:0.1:10; y  x 2  6x  20; z  3x  5

Plot y as function of x, and z as function of x. Show the traces as red dotted


line and blue solid line, respectively, label the x- and y-axis, and label graph
as Figure of Example 1.15.

Solution:
>>x=0:0.1:10;
y=x.^2-6*x-20;
z=2*x-5;
plot(x,y,'r:',x,z,'b-')
xlabel('x axis')
7425_C001.qxd 9/2/06 12:03 PM Page 21

Starting with MATLAB® and Exploring Its Graphics Capabilities 21

ylabel('y-z axis')
title('Figure of Example 1.15')
grid

In the above solution, we plotted both curves on the same graph. Often, it may
be required to plot the two curves in separate graphs but in the same figure
window. This can be achieved using the subplot command. The arguments
of the subplot command subplot(m,n,p) specify m the number of rows par-
titioning the graph, n the number of columns, and p the number of the partic-
ular subgraph chosen (enumerated through the left to right, top to bottom
convention). The program to plot the above arrays in two graphs in a column
would read

>>x=0:0.1:10;
y=x.^2-6*x-20;
z=2*x-5;
subplot(2,1,1)
plot(x,y,'r:')
xlabel('x axis')
ylabel('y axis')
title('Figure of Example 1.14-a')
subplot(2,1,2)
plot(x,z,'b-')
xlabel('x axis')
ylabel('z axis')
title('Figure of Example 1.14-b') ⵧ

All the plotting that we did so far has been using the linear scale in both the
horizontal and vertical axes. Sometimes when the elements of an array can
change values by several decades over the range of interest, it is well advised
to use the different kinds of the log-plots. As the need arises we can, instead
of the plot command, use one of the following alternatives:

semilogy creates a semilog plot with logarithmic scale on the y-axis


semilogx creates a semilog plot with logarithmic scale on the x-axis
loglog creates a log–log graph

Homework Problem
Pb. 1.6 The arrays y and z are generated from the array of positive inte-
gers x  1:20, such that:
y  2x and z  51/x
Plot the array z as function of the array y. (You should be able to read off
the value of the coordinates of any point on the plot over the entire range
of the graph.)
7425_C001.qxd 9/2/06 12:03 PM Page 22

22 Elementary Mathematical and Computational Tools Using MATLAB®

1.7 Data Analysis


1.7.1 Manipulation of Data
The most convenient representation for data collected from experiments is in
the form of histograms. Typically, you collect data and want to sort it out in
different bins. But prior to getting to this point, let us review and introduce
some array-related commands that are useful in data manipulation.
Let {yn} be a data set. It can be represented in MATLAB by an array y.

length(y) gives the length of the array (i.e., the number of data points)
y(i) gives the value of the element of y in the ith position
y(i:j) gives a new array, consisting of all elements of y between and
including the locations i and j
find(y) computes a new array where the successive elements indicate
the positions where the components of the array y are nonzero
max(y) gives the value of the largest element in the array
min(y) gives the value of the smallest element in the array
sort(y) sorts the elements of y in ascending order and gives a new
array of the same size as y
sum(y) sums the elements of y. The answer is a scalar
mean(y) gives the mean value of the elements of y
std(y) computes the standard deviation of the elements of y

The definitions of the mean and of the standard deviation are, respectively,
given by

N
1
y
N
∑ y(i)
i1

N
( y(i)  y )2
 ∑
i1 ( N  1)

where N is the length of the array.

EXAMPLE 1.16

An old recorder at Bill’s backyard in Hamilton Heights in New York down-


loaded the following raw data for the temperature readings on July 25
between 12:01 p.m. and 1:00 p.m.:

T=[95 95.5 96 95.8 97 96.5 96 95 55 96 95 97 96 ...


96.5 96.2 125 96 95 95.5 96]
Discovering Diverse Content Through
Random Scribd Documents
1886. The latter is a hostage in Kashmîr, to secure the good behaviour of his
tribe, which is really infinitely superior in culture and piety to those around
them. The father, who is over 90, writes in Persian to the following effect,
after the usual compliments:—“The affairs of this place are by your fortune in
a fair way, and I am in good health and constantly ask the same for you from
the Throne which grants requests. Your kind favour with a drawing of the
Mosque has reached me, and has given me much pleasure and satisfaction.
The reason of the delay in its receipt and acknowledgment is due to the
circumstance that, owing to disturbances (fesád) I have not sent agents to
Kashmîr this year. After the restoration of peace, I will send [a letter] with
them. In the meanwhile, I have caught your hem [seek your protection] for
my son Habibullah Khan, a beloved son, about whom I am anxious; the
aforesaid son is a well-wisher to the illustrious English Government.—Za’far
Khan.” [The letter was apparently written in June last, when The Times
reported a “rising,” because the British Agent was at Chalt with 500 men.]
It seems to me that none but a farseeing man could, in the midst of a
misunderstanding, if not a fight, with us, so write to one in the enemy’s camp,
unless he were a true man alike in war and peace, and a ruler whose good-
will was worth acquiring. As for his son, I know him to be indeed well-
disposed to our Government. He was very popular among our officers when I
saw him in Kashmîr, owing to his modesty, amiability, and unsurpassed
excellence at Polo. In fact, my friendship with several of the chiefs since 1866
has aided our good relations with them; and it is a pity if they should be
destroyed for want of a little “savoir,” as also “savoir faire,” on our part.
Between the States of Nagyr and Hunza there exists a perpetual feud. They
are literally rivals, being separated by a swift-flowing river on which, at almost
regulated distances, one Nagyr fort on one bank frowns at the Hunza fort on
the other. The paths along the river sides are very steep, involving at times
springing from one ledge of a rock to another, or dropping on to it from a
height of six feet, when, if the footing is lost, the wild torrent sweeps one
away. Colonel Biddulph does not credit the Nagyris with bravery. History,
however, does not bear out his statement; and the defeat inflicted on the
Kashmîr troops under Nathu Shah in 1848 is a lesson even for the arrogance
of a civilized invader armed with the latest rifle. The Nagyris are certainly not
without culture; in music they were proficient before the Muhammadan piety
of the Shiah sect somewhat tabooed the art. At all events, they are different
in character from the Hunzas with whom they share the same language, and
their chiefs the same ancestry. The Hunzas, in whom a remnant of the Huns
may be found, were great kidnappers; but under Kashmîr influence they
stopped raiding since 1869, till the confusion incidental to our interference
revived their gone occupation. Indeed, it is asserted on good authority, that
even our ally of Chitrál, who had somewhat abandoned the practice of selling
his Shiah or Kalásha Kafir subjects into slavery, and who had so disposed of
the miners for not working his ruby mines to profit, has now returned to the
trade in men, “with the aid of our present of rifles and our moral support.” Nor
is Bokhara said to be behind Chitrál in the revival of the slave-trade from
Darwáz, in spite of Russian influence; so that we have the remarkable
instance of two great Powers both opposed to slavery and the slave-trade,
having revived it in their approach to one another. Nor is a third Power, quite
blameless in the matter; for when we worried Hunza, that robber-nest
remembered its old allegiance to distant Kitái and arranged with the Chinese
authorities at Yarkand to be informed of the departure of a caravan. Then,
after intercepting it on the Kulanuldi road, the Hunzas would take those they
kidnapped from it back for sale to Yarkand!
As a matter of fact, we have now a scramble for the regions surrounding
and extending into the Pamirs by three Powers, acting either directly or
through States of Straw. The claims of Bokhara to Karategin and Darwáz—if
not to Shignán, Raushan, and Wakhan are as little founded as are those of
Afghanistan on the latter three districts. Indeed, even the Afghan right to
Badakhshan is very weak. The Russian claims through Khokand on the
pasturages of the Kirghiz in two-thirds of the Pamirs are also as fanciful as
those of Kashmir or China on Hunza. As in the scramble for Africa, the natives
themselves are not consulted, and their indigenous dynasties have been
either destroyed, or dispossessed, or ignored.

In an Indian paper, received by to-day’s mail (29 Nov., 1891), I find the
following paragraph: “Col. A. G. Durand, British Agent at Gilgit, has received
definite orders to bring the robber tribes of Hunza and Nagar under control.
These tribes are the pirates of Central Asia, whose chief occupation is
plundering caravans on the Yarkand and Kashgar. Any prisoners they take on
these expeditions are sold into slavery. Colonel Durand has established an
outpost at Chalt, about thirty miles beyond Gilgit, on the Hunza river, and
intends making a road to Aliabad, the capital of the Hunza chief, at once. That
he will meet with armed opposition in doing so is not improbable.”
For some months past the mot d’ordre appears to have been given to the
Anglo-Indian Press, to excite public feeling against Hunza and Nagyr, two
States which have been independent for fourteen centuries. The cause of
offence is not stated, nor, as far as I know, does one exist of sufficient validity
to justify invasion. In the Pioneer and the Civil and Military Gazette I find
vague allusions to the disloyalty or recalcitrance of the above-mentioned
tribes, and to the necessity of punishing them. As Nagyr is extremely well-
disposed towards the British, and is only driven into making common cause
with its hereditary foe and rival of Hunza by fear of a common danger,—the
loss of their independence,—I venture to point out the impolicy and injustice
of interfering with these principalities.
I have already referred to a letter from the venerable chief of Nagyr, in
which he strongly commends to my care one of his sons, Raja Habibulla, as a
well-wisher of the English Government. Indeed, he has absolutely done
nothing to justify any attack on the integrity of his country; and before we
invade it other means to secure peace should be tried. I have no doubt that I,
for one, could induce him to comply with everything in reason, if reason, and
not an excuse for taking his country, is desired. Nagyr has never joined Hunza
in kidnapping expeditions, as is alleged in the above-quoted paragraph.
Indeed, slavery is an abomination to the pious and peaceful agriculturist of
that interesting country. The Nagyris are musical and were fond of dances,
polo, ibex battue-hunting, archery and shooting from horseback, and other
manly exercises; but the growing piety of the race has latterly proscribed
music and dancing. The accompanying drawing of a Nagyri dance in the
neighbouring Gilgit gives a good idea of similar performances at Nagyr.
The country is full of legendary lore, but less so than Hunza, where Grimm’s
fairy tales appear to be translated into actual life. No war is undertaken except
at the supposed command of an unseen fairy, whose drum is on such
occasions sounded in the mountains. Ecstatic women, inhaling the smoke of a
cedar-branch, announce the future, tell the past, and describe the state of
things in neighbouring valleys. They are thus alike the prophets, the
historians, and the journalists of the tribe. They probably now tell their
indignant hearers how, under the pretext of shooting or of commerce,
Europeans have visited their country, which they now threaten to destroy with
strange and murderous weapons; but Hunza is “ayeshó,” or “heaven-born,”
and the fairies, if not the inaccessible nature of the country, will continue to
protect it.
The folly of invading Hunza and Nagyr is even greater than the physical
obstacles to which I have already referred. Here, between the Russian and
the British spheres of influence in Central Asia, we have not only the series of
Pamirs, or plateaux and high valleys, which I first brought to notice on
linguistic grounds, in the map accompanying my tour in Dardistan in 1866
(the country between Kashmir and Kabul), and which have been recently
confirmed topographically; but we have also a large series of mountainous
countries, which, if left alone, or only assured of our help against a foreign
invader, would guarantee for ever the peace alike of the Russian, the British,
and the Chinese frontiers. Unfortunately, we have allowed Afghanistan to
annex Badakhshan, Raushan, Shignan, and Wakhan, at much loss of life to
their inhabitants; and Russia has similarly endorsed the shadowy and recent
claims of Bokhara on neighbouring provinces, like Darwáz and Karategin.
It is untrue that Hunza and Nagyr were ever tributaries of Kashmîr, except
in the sense that they occasionally sent a handful of gold dust to its Maharaja,
and received substantial presents in return. It is to China or Kitái that Hunza
considers itself bound by an ancient, but vague, allegiance. Hunza and Nagyr,
that will only unite against a foreign common foe, have more than once
punished Kashmîr when attempting invasion; but they are not hostile to
Kashmîr, and Nagyr even sends one of the princes to Srinagar as a guarantee
of its peaceful intentions. At the same time, it is not very many months ago
that they gave us trouble at Chalt, when we sought to establish an outpost,
threatening the road to Hunza and the independence alike of Hunza and
Nagyr.
Just as Nagyr is pious, so Hunza is impious. Its religion is a perversion even
of the heterodox Mulái faith, which is Shiah Muhammadan only in name, but
pantheistic in substance. It prevails in Punyál, Zebak, Darwáz, etc. The Tham,
or Raja, of Hunza used to dance in a Mosque and hold revels in it. Wine is
largely drunk in Hunza, and like the Druses of the Lebanon, the “initiated”
Muláis may consider nothing a crime that is not found out. Indeed, an
interesting connection can be established between the doctrines of the so-
called “Assassins” of the Crusaders, which have been handed down to the
Druses, and those of the Muláis in various parts of the Hindukush. Their
spiritual chief gave me a few pages of their hitherto mysterious Bible, the
“Kelám-i-Pir,” in 1886, which I have translated, and shortly intend to publish.
All I can now say is, that, whatever the theory of their faith, the practice
depends, as elsewhere, on circumstances and the character of the race.
The language of Hunza and Nagyr solves many philological puzzles. It is a
prehistoric remnant, in which a series of simple consonantal or vowel sounds
stands for various groups of ideas, relationships, etc. It establishes the great
fact, that customs and the historical and other associations of a race are the
basis of the so-called rules of grammar. The cradle, therefore, of human
thought as expressed in language, whether of the Aryan, the Turanian, or the
Shemitic groups, is to be found in the speech of Hunza-Nagyr; and to destroy
this by foreign intervention, which has already brought new diseases into the
Hindukush, as also a general linguistic deterioration, would be a greater act of
barbarism than to permit the continuance of Hunza raiding on the Yarkand
road. Besides, that raiding can be stopped again, by closing the slave-markets
of Badakhshan, Bokhara, and Yarkand, or by paying a subsidy, say of £1,000
per annum, to the Hunza chief.
Indeed, as has already been pointed out, the recrudescence of kidnapping
is largely due to the state of insecurity and confusion caused by our desire to
render the Afghan and the Chinese frontiers conterminous with our own, in
the vain belief that the outposts of three large and distant kingdoms, acting in
concert, will keep Russia more effectively out of India than a number of small
independent republics or principalities. Afghanistan may now be big, but every
so-called subject in her outlying districts is her inveterate foe. As stated in a
letter from Nevsky to the Calcutta Englishman, in connection with Colonel
Grambcheffsky’s recent explorations:
“One and all, these devastated tribes are firm in their conviction that the
raids of their Afghan enemies were prompted and supported by the gold of
Abdur Rahman’s English protectors. They will remember this on the plateau of
Pamir, and among the tribes of Kaffiristan.”
However colourable this statement may be as regards Shignán, Raushan,
and perhaps even Wakhan, I believe that the Kafirs are still our friends. At the
same time it should not be forgotten that, owing to the closing of the slave-
markets in Central Asia, the sale of Shiah subjects had temporarily stopped in
Chitrál. The Kafirs were being less molested by kidnapping Muhammadan
neighbours; the Hunzas went back to agriculture, which the Nagyris had
never abandoned; Kashmîr, India, and the Russian side of Central Asia
afforded no opening for the sale of human beings. The insensate ambition of
officials, British and Russian, the gift of arms to marauding tribes and the
destruction of Kashmîr influence, have changed all this, and it is only by a
return to “masterly inactivity,” which does not mean the continuance of the
Cimmerian darkness that now exists as to the languages and histories of the
most interesting races of the world, that the peace and pockets of three
mighty empires can be saved.
In the meanwhile, it is to the interest of Russia to force us into heavy
military expenditure by false alarms; to create distrust between ourselves and
China by pretending that Russia and England alone have civilizing missions in
Central Asia, with which Chinese tyranny would interfere; to hold up before us
the Will-o’-the-wisp of an impossible demarcation of the Pamirs, and finally, to
ally itself with China against India. For let it not be forgotten, that once the
Trans-Siberian railway is completed, China will be like wax in her hand; and
that she will be compelled to place her immense material in men and food at
the disposal of an overawing, but, as far as the personnel is concerned, not
unamiable neighbour. The tribes, emasculated by our overwhelming
civilization, and driven into three large camps, will no longer have the power
of resistance that they now possess separately.
Let us therefore leave intact the two great belts of territories that Nature
has raised for the preservation of peace in Asia—the Pamir with its adjacent
regions to the east and west, and the zone of the Hindukush with its hives of
independent tribes, intervening between Afghanistan on the one side and
Kashmîr on the other, till India proper is reached. This will never be the case
by a foreign invader, unless diplomatists “meddle and muddle,” and try to put
together what Nature has put asunder. What we require is the cultivation of
greater sympathy in our relations with natives; and, comparing big things with
small, it is to this feeling that I myself owed my safety, when I put off the
disguise in which I crossed the Kashmîr frontier in 1866 into countries then
wrongly supposed by our Government to be inhabited by cannibals. This
charge was also made, with equal error, by one tribe against the other. Then
too, as in 1886, the Indian Press spoke of Russian intrigues; but then, as in
1886, I found the very name of Russia to be unknown, except where it had
been learnt from a Kashmîr Munshi, who had no business to be there at all, as
the treaty of 1846, by which we sold Kashmîr to Ghulab Singh, assigned the
Indus as his boundary on the west. Now, as to the question as to “What and
where are the Pamirs?” I have already stated my view in a letter to the Editor
of the Morning Post, which I trust I may be allowed to quote:
“As some of the statements made at the Royal Geographical Society are
likely to cause a sense of false security, as dangerous to peace as a false
alarm, I write to say that ‘Pamirs’ do not mean ‘deserts,’ or ‘broken valleys,’
and that they are not uninhabitable or useless for movements of large bodies
of men. They may be all this in certain places, at certain periods of the year,
and under certain conditions; but had our explorers or statesmen paid
attention to the languages of this part of the world, as they should in regard
to every other with which they deal, they would have avoided many idle
conjectures and the complications that may follow therefrom. I do not wish
them to refer to philologists who have never been to the East, and who
interpret ‘Pamir’ as meaning the ‘Upa-Meru’ Mountain of Indian mythology,
but to the people who frequent the Pamirs during the summer months, year
after year, for purposes of pasturage, starting from various points, and who in
their own languages (Yarkandi, Turki, and Kirghiz) call the high plain, elevated
valley, table-land, or plateau which they come across ‘Pamir.’ There are,
therefore, in one sense many ‘Pamirs,’ and as a tout-ensemble, one ‘Pamir,’ or
geographically, the ‘Pamir.’ The legend of the two brothers, ‘Alichur and Pamir,’
is merely a personification of two plateaux. Indeed, the obvious and popular
idea which has always attached to the word ‘Pamir,’ is the correct one,
whether it is the geographical ‘roof of the world,’ the ‘Bám-i-dunya’ of the
poet, or the ‘Pamir-dunya’ of the modern journalist. We have, therefore, to
deal with a series of plateaux, the topographical limits of which coincide with
linguistic, ethnographical, and political limits. To the North, the Pamirs have
the Trans-Altaic Mountain range marking the Turki element, under Russian
influence; the Panja river, by whatever name, on the West is a Tadjik or
Iranian Frontier [Affghan]. The Sarikol on the East is a Tibetan, Mongolian, or
Chinese Wall, and the South is our natural frontier, the Hindukush, to go
beyond which is physical death to the Hindu, and political ruin to the holder of
India, as it also is certain destruction to the invader, except by one pass,
which I need not name, and which is accessible from a Pamir. That the Pamirs
are not uninhabitable may be inferred from Colonel Grambcheffsky’s account
[which is published at length elsewhere in this issue of the Asiatic Quarterly
Review]. A few passages from it must now suffice:—‘The Pamir is far from
being a wilderness. It contains a permanent population, residing in it both
summer and winter.’ ‘The population is increasing to a marked extent.’ ‘Slavery
on the Pamir is flourishing: moreover, the principal contingents of slaves are
obtained from Chatrar, Jasen, and Kanshoot, chanates under the protectorate
of England.’ ‘On descending into Pamir we found ourselves between the
cordons of the Chinese and Affghan armies.’ ‘The population of Shoognan,
numbering 2,000 families, had fled to Pamir, hoping to find a refuge in the
Russian Provinces’ (from ‘the untold atrocities which the Affghans were
committing in the conquered provinces of Shoognan,’ etc.). ‘I term the whole
of the tableland “Pamir,” in view of the resemblance of the valleys to each
other.’
“The climate of the Pamirs is variable, from more than tropical heat in the
sun to arctic cold in the shade, and in consequence, is alike provocative and
destructive of life. Dr. G. Capus, who crossed them from north to south,
exactly as Mr. Littledale has done, but several months in the year before him,
says in his ‘Observations Météorologiques sur le Pamir,’ which he sent to the
last Oriental Congress,—‘The first general fact is the inconstancy of severe
cold. The nights are generally coldest just before sunrise.’ ‘We found an
extreme amplitude of 61 deg. between the absolute minimum and maximum,
and of 41 deg. between the minimum and the maximum in the shade during
the same day.’ ‘The thermometer rises and falls rapidly with the height of the
sun.’ ‘Great cold is less frequent and persistent than was believed to be the
case at the period of the year dealt with’ (March 13 to April 19), ‘and is
compensated by daily intervals of elevation of temperature, which permit
animal life, represented by a fairly large number of species, and including
man, to keep up throughout the winter under endurable conditions.’ Yet ‘the
water-streak of snow, which has melted in contact with a dark object, freezes
immediately when put into the shadow of the very same object.’ ... The
solution of political difficulties in Central Asia is not in a practically impossible,
and certainly unmaintainable, demarcation of the Pamirs, but in the
strengthening of the autonomy of the most interesting races that inhabit the
series of Circassias that already guard the safety alike of British, Chinese, and
of Russian dominion or spheres of influence in Central Asia.”

Woking, Nov. 29.


It is not impossible that the tribes may again combine in 1892 as they did in
1866 to turn out the Kashmîr troops from Gilgit. The want of wisdom shown in
forcing on the construction of a road from Chalt to Aliabad, in the centre of
Hunza, as announced in to-day’s Times, must bring on, if not a confederation
of the tribes against us, at any rate their awakened distrust. It is doubtful
whether it was ever expedient to establish an outpost at Gilgit, and the
carrying it still farther to the traditional apple of discord, the holding of Chalt,
which commands the Hunza road, is still more impolitic. As in Affghanistan, so
here, whatever power does not interfere is looked upon as the saviour from
present evils. Once we have created big agglomerations under Affghanistan,
or China, or Kashmir, we are liable to the dangers following either on collapse,
want of cohesion, treachery from within, the ambitions of a few men at the
respective courts, or, as with us, to serious fluctuations in foreign politics due
to the tactics of English parties. The change, therefore, from natural
boundaries to the wirepulling of diplomatists at Kabul, Peking, or Downing
Street is not in the interests of peace, of our empire, or of civilization.
Besides, it should not be forgotten that we have added an element of
disturbance, far more subtle than the Babu, to our frontier difficulties. The
timid Kashmîri is unsurpassed as an intriguer and adventurer among tribes
beyond his frontier. The time seems to have arrived when, in the words of the
well-known Persian proverb,[107] the sparseness of races round the Pamirs
should bid us to be on our guard against the Affghan, the “bad-raced”
Kashmîrî, and the Kambó (supposed to be the tribe on the banks of the
Jhelum beyond Mozaffarabad). Perhaps, however, the Kambó is the Heathen
Chinee; and the proverb would then be entirely applicable to the present
question. After the construction of the Trans-Siberian Railway, Russia will be
able to exert the greatest pressure on China. The Russian strength at
Vladivostok is already enormous, and when the time comes she can hurl an
overwhelming force on what remains of Chinese Manchuria, before which
Chinese resistance will melt like snow. Peking and the north of China are thus
quite at the mercy of Russia. She will find there the most populous country of
those she rules in Asia, and with ample supplies. China has a splendid raw
material, militarily speaking; and Russia could there form the biggest army
that has ever been seen in Asia, to hold in terrorem over a rival or to hurl at
the possessions of a foe.
It is against such possibilities that the maintenance of “masterly inactivity,”
qualified by the moral and, if need be, pecuniary or other material support of
the Anglo-Indian Government is needed. This is the object of this paper,
before I enter into the more agreeable task of describing the languages,
customs, and country of perhaps the most interesting races that inhabit the
globe.

The Times of the 30th November publishes a map of the Pamirs and an
account of the questions connected with them that, like many other
statements in its articles on “Indian affairs,” are incorrect and misleading.
Having been on a special mission by the Panjab Government, in 1866, when I
discovered the races and languages of “Dardistan,” and gave the country that
name, and again having been on special duty with the Foreign Department of
the Government of India in 1886 in connection with the Boorishki language
and race of Hunza, Nagyr, and a part of Yasin, regarding which I have recently
completed Part I. of a large work, I may claim to speak with some authority
as regards these districts, even if I had no other claim. The point which I wish
to specially contradict at present, is the one relating to the Russians bringing
themselves into almost direct contact with “the Hunza and other tribes subject
to Kashmîr and, as such, entitled to British protection and under British
control.”
Dr. Leitner as a Bukhara Maulvi, when crossing the Frontier in 1866
during the Kashmîr War with the Dard Tribes.

When I crossed the then Kashmîr frontier in 1866, in the disguise of a


Bokhara Maulvi, armed with a testimonial of Muhammadan theological
learning, I found that the tribes of Hunza, Nagyr, Dareyl, Yasin, and Chitrál
had united under the leadership of the last-named to expel the Kashmîr
invaders from the Gilgit Fort. My mission was a purely linguistic one; but the
sight of dying and dead men along the road, that of heads stuck up along the
march of the Kashmîr troops, and the attempts made on my life by our
feudatory, the late Maharaja of Kashmîr, compelled me to pay attention to
other matters besides the languages, legends, songs, and fables of the
interesting races with whom I now came in contact under circumstances that
might not seem to be favourable to the accomplishment of my task. I had
been warned by the then Lieutenant-Governor of the Panjab, Sir Donald
McLeod, whose like we have not seen again, not to cross the frontier, as the
tribes beyond were supposed to be cannibals; but as I could not get the
information of which I was in search within our frontier, I had to cross it. My
followers were frightened off by all sorts of wild stories, till our party was
reduced from some fifty to three, including myself. The reason for all this was,
that the Maharaja was afraid that I should find out and report his breach of
the Treaty by which we sold Kashmîr to him in 1846, and in which the Indus is
laid down as his boundary on the west. In 1866, therefore, at any rate, even
the tenure of Gilgit, which is on the other side of the Indus, was contested
and illegal, whilst the still more distant Hunza and Nagyr had more than once
inflicted serious punishment on the Kashmîr troops that sought to invade
districts that have preserved their autonomy during the last fourteen
centuries, as was admitted by The Times of the 2nd November, 1891, before
its present change with the times, if an unintentional pun may be permitted.
Then, as ever, the Anglo-Indian newspapers spoke of Russian intrigues in
those regions. I am perfectly certain that if, instead of the fussiness of our
statesmen and the sensationalism of our journals, the languages, history, and
relations of these little-known races had been studied by them, we should
never have heard of Russia in that part of the East. It is also not by
disingenuousness and short cuts on maps or in diplomacy, but by knowledge,
that physical, ethnographical, and political problems are to be solved; nor will
the bold and brilliant robberies of Russia be checked by our handing over the
inhabitants of the supposed “cradle of the human race” to Affghan, Kashmîr,
or Chinese usurpations. Above all, it is a loss of time to palm off myths as
history in order to suit the policy or conceal the ignorance of the moment.
Just as little as Darwaz and Karategin are ancestral dominions of Bokhara,
and, therefore, under Russian influence, so little did even Badakhshan, and
much less so, Raushan, Shignan, and Wakhan, ever really belong to
Affghanistan. As for the Chinese hold on Turkistan, we ourselves denied it
when we coquetted with Yakub Khush Begi, though Kitái was ever the
acknowledged superior of Eastern Turkistan. If Hunza admits any allegiance, it
is to China, and not to Kashmîr; and the designations of offices of rule in that
country are of Chinese, and not of Aryan origin, including even “Thàm,” the
title of its Raja.
As a matter of fact, however, the vast number of tribes that inhabit the
many countries between the Indus and the Kuner own no master except their
own tribal head or the tribal council. From kidnapping Hunza, where the right
to plunder is monarchical, hereditary, and “ayeshó” = “heaven-born,” to the
peace and learning of republican Kandiá or Gabriál, all want to be left alone. If
a neighbour becomes troublesome, he is raided on till an interchange of
presents restores harmony. It is impossible to say that either side is tributary
to the other. The wealthier gives the larger present; the bigger is considered
the superior in a general sort of way, and so two horses, two dogs, and a
handful of gold dust are yearly sent by Hunza to Kashmîr or to Yarkand as a
cloak for much more substantial exactions in return. Nagyr sends a basket of
apricots instead of the horses and dogs. In 1871 Chitrál still paid a tribute to
Badakhshan in slaves, but it would be absurd to infer from this fact that
Chitrál ever acknowledged the suzerainty of Jehandar Shah, or of the Affghan
faction that dispossessed him. Nor were the Khaibaris, or other highway
robbers, our rulers, because we paid them blackmail, or they our subjects
because they might bring us “sweetmeats.”
The points in which most Englishmen are as deficient as Russians are
generally proficient, are language and a sympathetic manner with natives.
That, however, linguistic knowledge is not useless may be inferred from the
fact that it enabled me, to use the words of my Chief, Commissary General H.
S. Jones, C.B., during the Russian War in 1855, “to pass unharmed through
regions previously unknown and among tribes hitherto unvisited by any
European.”
Also in topography and geography linguistics are necessary; and the absurd
mistakes now made at certain learned societies and in certain scientific
journals, regarding the Pamirs, would be avoided by a little study of the
Oriental languages concerned. In 1866, the map which accompanies my
philological work on “Dardistan” shows, on linguistic grounds, and on the
basis of native itineraries, the various Pamirs that have been partially revealed
within the last few weeks, or have been laboriously ascertained by expensive
Russian and British expeditions between 1867 and 1890. The publication of
my material, collected at my own expense and which shall no longer be
delayed, would have saved many complications; but when, e.g., I pointed out,
in 1866, that the Indus, after leaving Bunji, ran west instead of south, as on
the then existing maps, I got into trouble with the Topographical Survey,
which “discovered” the fact through its well-known “Mulla” in 1876. The
salvation of India that is not made “departmentally” is crucified; and whoever
does not belong to the regular military or civil services has no business to
know or to suggest. Mr. Curzon, when presiding at a meeting of the late
Oriental Congress, assured us that a new era had risen; but only the other
night, at the Royal Geographical Society, a complaint was made of the
reluctance of official departments in giving the Society information. As a rule,
the mysteriousness of offices only conceals their ignorance, of which we have
an instance in Capt. Younghusband being sent to shut the passes after the
Russians had already stolen a march on, or through, them.
The neutralization of the Pamirs is the only solution of a difficulty created by
the conjectural treaties of diplomatists and the ambition of military emissaries.
Left as a huge happy hunting-ground for sportsmen, or as pasturage for
nomads from whatever quarter, the Pamirs form the most perfect “neutral
zone” conceivable. That the wanderings of these nomads should be
accompanied by territorial or political claims, whether by Russia, China,
Affghanistan, Kashmir, or ourselves, is the height of absurdity. As for Hunza-
Nagyr, the sooner they are left to themselves the better for us, who are not
bound to help Kashmîr in encroaching on them. Kashmîr managed them very
fairly after 1848; and when it was occasionally defeated, its prestige did not
suffer, for the next summer invariably found the tribal envoys again suing for
peace and presents. The sooner the Gilgit Agency is withdrawn, the greater
will be our reputation for fair dealing. Besides, we can take hostages from the
Chiefs’ families as guarantees of future tranquillity. Hunza-Nagyr are certainly
not favourable to Russia, whilst Nagyr is decidedly friendly to us. The
sensational account of Colonel Grambcheffsky’s visit to Hunza, which he
places on his map where Nagyr is, seems to be one of the usual traps to
involve us in great military expenditure and to alienate the tribes from us. It is
also not creditable that, for party or personal purposes, the peaceful and
pious Nagyris,—whom our own Gilgit Resident, Colonel Biddulph, has reported
on as distinguished for “timidity and incapacity for war,” “never having joined
the Hunza raids,” “slavery being unknown in Nagyr,”—should be described as
“kidnappers,” “raiders along with Hunza,” “slave-dealers,” “robbers,” and
“scoundrels,”—statements made by a correspondent from Gilgit in a morning
newspaper of to-day, and to all of which I give an unqualified contradiction.
The establishment of the Gilgit Agency has already drawn attention to the
shortest road for the invasion of India; and it is significant that its advocate at
Gilgit should admit that all the tribes of the Indus Valley “sympathized with
the Hunzas,” from whose depredations they are erroneously supposed to have
suffered, and that they were likely “to attack the British from behind by a
descent on the Gilgit road” to Kashmîr. Why should “the only other exit from
Gilgit by way of the Indus Valley be through territories held by tribes hostile to
the British”? Have the Gilgit doings already alienated the poor, but puritanical
Chilásis, tributaries of Kashmîr, who adjoin our settled British district of
Kaghan? Are we to dread the Republic of Muhammadan learning, Kandiá, that
has not a single fort; pastoral Dareyl; the Koli-Palus traders; agricultural
Tangir, and other little Republics—one only of eleven houses? As for the places
beyond them, our officials at Attock, Peshawur, Rawalpindi, and Abbottabad
will deal with the Pathan tribes in their own neighbourhood, which have
nothing to do with the adjoining Republics of quiet, brave, and intelligent
Dards, on both sides of the Indus, up to Gilgit, to which I have referred, and
which deserve our respectful study, sympathy, and unobtrusive support.
G. W. Leitner.
16th December, 1891.

The following account, published by Reuter’s Telegram Company, will


supplement the preceding article:—
“Woking, Dec. 13.
“A representative of Reuter’s Agency interviewed Dr. Leitner at his residence
at Woking to-day, with the object of eliciting some information on the subject
of the Hunza and Nagyr tribes, with whom the British forces are at present in
conflict.
“Dr. Leitner, it is needless to say, is the well-known discoverer of the races
and languages of Dardistan (the country between Kabul and Kashmir), which
he so named when sent on a linguistic mission by the Punjab Government in
1864, at a time when the various independent tribes, including Hunza and
Nagyr, had united in order to turn the troops of the Maharaja of Kashmir out
of Gilgit. At that time it was considered that the treaty of 1846, by which
Great Britain sold Kashmir to the Maharaja, had confined him to the Indus as
his westward boundary, and had therefore rendered his occupation of Gilgit
an encroachment and breach of treaty.
“Dr. Leitner, although the country was in a state of war, which is not
favourable to scientific research, managed to collect a mass of information,
and a fine ethnographical collection, which is at the museum at Woking. He
has also made many friends in the country, and is doubtless the highest, if not
the only, authority regarding these countries.
“Dr. Leitner, who was quite unprepared for to-day’s visit, said that the
relations which he had kept up with the natives of Gilgit, Hunza, Nagyr, and
Yasin forced him to the conclusion that a conflict had been entered into which
might have easily been avoided by a little more sympathy and knowledge,
especially of the Nagyr people. Indeed, it was not a light matter that could
have induced the venerable chief of Nagyr to make common cause with his
hereditary foe of Hunza, unless he feared that the British threatened their
respective independence.
“Not many weeks ago Dr. Leitner received a letter from the chief of Nagyr,
in which he recommended to his kind attention his son, now in Kashmir, on
the ground that he, even more so than any other member of his numerous
family, was a well-wisher to the British Government. At that time the chief
could not have had any feelings of animosity, although he might have
protested, together with his rival of Hunza, against the British occupation of
Chalt. In fact, it was not true that Nagyr and Hunza were really subject to
Kashmir, except in the vague way in which these States constantly recognised
the suzerainty of a neighbouring power in the hope of getting substantial
presents for their offerings of a few ounces of gold dust, a couple of dogs, or
basket of apricots, etc. Thus Chitrál, the ally of Great Britain, used to pay a
tribute of slaves to the Ameers of Badakshan; but it would be absurd on that
ground to render Chitrál a part of Afghanistan, because Badakshan now, in a
manner, belongs to Abdurrahman. Hunza, again, sends a tribute to China;
and, in a general way, China is the only Power that ever had a shadow of
claim on these countries, but it is a mere shadow. Dr. Leitner said, the only
policy for Great Britain is, in the words of the Secretary of State or Viceroy, ‘to
maintain and strengthen all the indigenous Governments.’ This policy he
would extend to the triangle which has Peshawur for its base, and thereby
interpose a series of almost impregnable mountainous countries, which would
be sufficiently defended by the independence of their inhabitants. If Circassia
could oppose Russia for thirty years, even although Russia had the command
of the Black Sea, how much more effective would be the resistance of the
innumerable Circassias which Providence had placed between ourselves and
the Russian frontier in Asia? We ought to have made these tribes look upon us
as a distant but powerful friend, ready to help them in an emergency; but
now, by attacking two of them, we caused Russia to be looked upon as the
coming Saviour; indeed, the people of Wakhan, on the Pamir side of Hunza,
were already doing so, whilst Shignan and Roshan, which had been almost
depopulated by our friends, the Afghans, had already begun to emigrate into
Russian territory. Here Dr. Leitner added that the Russian claims through
Bokhara were as illusory as those of Kashmir, and historically even less
founded than those of China. Indeed, no one had a right to these countries
except the indigenous peoples and chiefs who inhabited them; and in this
scramble for the regions round the Pamir, great Britain was simply breaking
down her natural defences by stamping out the independence of native tribes
and making military roads; for it was the absence of those roads on the
British side that rendered it impossible to an invader to do England any real
harm or to advance on India proper.
Asked why the trouble had broken out at the present time, Dr. Leitner said,
that he had been kept without information of the immediate cause, but he felt
certain that it was owing to the attempt to construct a military road to Hunza,
whereby England would only facilitate the advent of a possible invader from
that direction, besides making Hunza throw in its lot with that invader. It was
perfectly untrue, as alleged in some of the Indian papers, that the Nagyris
were kidnappers, and that our attack would be an advantage to the cause of
anti-slavery. The fact was just the other way. Kidnapping had been stopped in
1869 as far as Hunza was concerned.
The Nagyris never raided at all; Chitrál also gave up selling its Káfir or Shiah
subjects into slavery when the markets of Badakshan were closed; but now
that confusion had caused the English and Russian advance, Hunza had again
taken to raiding, and Chitrál to selling slaves. As for Nagyr, the case was quite
different; they were an excellent people and very quiet, so much so that
Colonel Biddulph, the Resident, described them as “noted for timidity and
incapacity for war,” whereas in his “Tribes of the Hindu Kush” he also states
that the people of Hunza are not warlike in the sense in which the Afghans
are said to be so. No doubt the Nagyris dislike war, but would fight bravely if
driven to do so. Colonel Biddulph adds: “They are settled agricultural
communities, proud of the independence they have always maintained for
fourteen centuries, hemmed in by lofty mountains, and living under rulers
who boast of long, unbroken descent from princes of native blood.” He also
bears testimony to the fact that “the Nagyr people were never concerned in
these raids, and slavery does not exist among them.” At the same time Dr.
Leitner fully admitted that the Hunza people were not a model race, since
they used to be desperate raiders and kidnappers, and very immoral and
impious. The father of the present king used to dance in a state of
drunkenness in the mosque; but, on the other hand, we were not bound to be
the reformers of Hunza by pulling down one of the bulwarks to our Indian
Empire. Hunza was a picturesque country in every sense; it was nominally
governed by fairies: ecstatic women were the prophetesses of the tribe,
recounted its past glories, and told what was going on in the neighbouring
valleys, so they were its historians and journalists as well as its prophetesses.
No war was undertaken unless the fairies gave their consent, and the chief
fairy, Yudeni, who protects the “Tham” (a Chinese title), has no doubt already
struck the sacred drum in order to call the men of the country to defend the
“Heaven-born,” as their chief is called. The two “Thams” of Hunza and Nagyr,
who have a common ancestry, are also credited with the power of causing
rain, and there would certainly appear to be some foundation for this
remarkable fact.
The two tribes are great polo players; archery on horseback is common
amongst them; and they are very fair ibex hunters.
The people of Nagyr are as pious and gentle as those of Hunza are the
contrary. Their language went back to simple sounds as indicative of a series
of human relations or experiences, and clearly showed that the customs and
associations of a race were at the basis of so-called rules of grammar. Nothing
more wonderful than their language could be conceived; it went to the root of
human thought as expressed in language, but the language had already
suffered by foreign influences between 1866, when one son of the Rajah of
Nagyr taught him, and 1886, when another son of the Rajah continued his
lessons.
As regards religion, the Hunzas are Mulais, a mysterious and heretical sect,
akin to the Druses of the Lebanon, practising curious rites, and practically
infidels. He had obtained a few pages of their secret Bible, the Kelam-i-pir,
which throws much light on the doctrines of the so-called “assassins” during
the Crusades. The Nagyris are pious Muhammadans of the Shiah
denomination.
Dr. Leitner then showed the map accompanying his linguistic work on
Dardistan. After comparing it with the most recent Russian and British maps,
that of Dr. Leitner gives the fullest and clearest information, not only as
regards Hunza-Nagyr, where all the places where fighting has occurred are
marked, but also as regards the various Pamirs, thus anticipating in 1866 on
linguistic grounds and native itineraries the different Pamirs that have recently
been settled geographically. It shows that the ethnographical frontier of the
Pamirs to the north are the Turki-speaking nomads of the trans-Altaic range
(now Russian); to the west the Persian, or Tajiks (now Afghan); to the south
the Aryan Hindu Kush [British]; and to the east the wall of the Serikol
Mountains, dividing or admitting Chinese, Tibetan, or Mongolian influence.
The indeterminate river courses through the Pamir, or a line stretched across
its plateaux, valleys, and mountains, are obviously an unmaintainable
demarcation, which is liable to be transgressed by shepherds under whatever
rule; but the whole of the Pamirs together, as a huge and happy hunting-
ground, are, no doubt, if neutralized by the three Powers concerned, the best
possible frontier, as “no man’s land,” and a perfect neutral zone. “What
matter,” continued Dr. Leitner, “if the passes are easy of access on the Russian
side, it is on the descent, and on the ascent on our side that almost
insuperable difficulties begin. Where we are now fighting in Hunza-Nagyr only
the low state of the river which divides Hunza from Nagyr enables us to make
a simultaneous advance on both. Otherwise we should have to let ourselves
man by man down from one ledge of rock to another, and if we miss our
footing be whirled away in the most terrible torrent the imagination can
conceive. Why, then, destroy such a great defence in our favour if Hunza is
kept friendly, as it so easily can be, especially with the pressure exercised on
it by the Nagyris, whose forts frown on those of Hunza all down the river that
separates their countries? I cannot conceive anything more wanton or suicidal
than the present advance even if we should succeed in removing one of the
most important landmarks in the history of the human race by shooting down
the handful of Nagyris and Hunzas that oppose us. They preserve the pre-
historic remnants of legends and customs that explain much that is still
obscure in the life and history of European races. A few hundred pounds a
year judiciously spent and the promise of the withdrawal of the Gilgit Agency,
which was already once before attacked when under Colonel Biddulph, would
be a far better way of securing peace than shooting down with Gatlings and
Martini-Henry rifles people who defend their independence within their crags
with bows, arrows, battleaxes, and a few muskets; and promise of the
withdrawal of the Gilgit Agency might be contingent upon the increase of the
number of hostages belonging to the chiefs’ families that are now annually
sent to Kashmir as a guarantee of friendly relations.
The Hunzas and Nagyris are not to be despised as foes; they are very good
marksmen. In 1886, when the Kashmir troops thought they had cleared the
plain before the Gilgit Fort entirely of enemies, and not a person was to be
seen outside it, the tribesmen would glide along the ground unperceived
behind a stone pushed in front of them, and resting their old flint muskets on
them shoot off the Maharajah’s Sepoys whenever they showed themselves
outside the fort. Indeed, it was this circumstance that induced Dr. Leitner to
abandon the protection of the fort and make friends with the tribesmen
outside. All the tribes desired was to be left alone in their mountain
fastnesses. They had sometimes internecine feuds, but would unite against
the common foe. It was merely emasculating their powers of resistance to
subject them, either on the one side to Bokhara, which meant Russia, or to
Afghanistan or Kashmir, which meant Great Britain, or to China, which meant
dependence on a Power that might be utilized any day against Great Britain
after the completion of the trans-Siberian railway. Diplomatists, frontier
delimitation commissions, and officers, both British and Russian, anxious for
promotion, had, continued Dr. Leitner, created the present confusion; and it
was now high time to rely rather on the physical obstacles that guaranteed
the safety alike of the British, Russian, and Chinese frontiers than on the
chapter of political accidents.
Dr. Leitner, who is going to give a lecture at the Westminster Town-hall to-
morrow afternoon on “The Races, Religions, and Politics of the Pamir
Regions,” then showed our representative Col. Grambcheffsky’s map, which
put Hunza where Nagyr ought to be, and ignored the latter place altogether,
just as did the last map of the Geographical Society in connection with Mr.
Littledale’s tour. Grambcheffsky’s map, however, had since been corrected by
evidently an English map, and it was strange that Russians had easier access
to English maps than Englishmen themselves. In fact, all this secrecy, Dr.
Leitner maintained, was injurious to the acquisition of full knowledge
regarding imperfectly known regions. Attention was then directed to a number
of maps, that of Mr. Drew, a Kashmir official, showing Hunza-Nagyr to be
beyond Kashmir influence. This was practically confirmed by several official
maps and the statements of Colonels Biddulph and Hayward, the latter of
whom placed the Kashmir frontier towards Hunza at Nomal, whilst the British
are now fighting sixteen and a half miles beyond in front of Mayun, where the
first Hunza fort is. The Nagyr frontier Dr. Leitner places at Jaglot, which is
nineteen miles from Nilt, where we are simultaneously fighting the first Nagyr
fort.
Dr. Leitner, in conclusion, expressed his conviction, from his knowledge of
the people concerned, that any one with a sympathetic mind could get them
to do anything in reason; but that encroachments, whether overt or covert,
would be resisted to the utmost. Indeed, England’s restlessness had brought
on the present trouble.
In 1866, he stated, the very name of Russia was unknown in these parts,
and in 1886 was only known to a few. Yet the English Press in both these
years spoke of Russian intrigues among the tribes. He did not fear them as
long as the Indian Empire relied on its natural defences, its inner strength,
and on justice to its chiefs and people, and as long as its policy with the tribes
was guided by knowledge and good feeling.

APPENDIX II.
NOTES ON RECENT EVENTS IN CHILÁS AND CHITRÁL.

In 1866 I was sent by the Punjab Government on a linguistic mission to


Kashmir and Chilás at the instance of the Bengal Asiatic Society and on the
motion of the late Sir George Campbell, who hoped to identify Kailás or the
Indian Olympus with Chilás.[108] Although unable to support that conjecture, I
collected material which was published in Part I. of my “Dardistan” and which
the Government declared “as throwing very considerable and important light
on matters heretofore veiled in great obscurity.” That some obscurity still
exists, is evident from the Times telegram of to-day (5th December, 1892), in
which an item of news from the Tak [Takk] valley is described as coming from
Chitrál, a distant country with which Chilás has nothing to do. The Takk village
is fortified, and through the valley is the shortest and easiest road to our
British district of Kaghán. It is alleged that some headmen of Takk wished to
see Dr. Robertson at Gilgit, who thereupon sent a raft to bring them, but the
raft was fired on and Capt. Wallace, who went to its assistance, was
wounded. [Chilás is on the Kashmir side of the Indus, and the Gilgit territory
is reached by crossing the Indus at Bunji.]
The incident is ascribed either to “the treachery of the men who professed
willingness to come in” or to the mischievousness of “other persons.” It is
probable from this suggestion of treachery and the unconscious use of the
words “to come in,” which is the Anglo-Indian equivalent for “surrender,” that
the headmen of Takk were not willing to make over their Fort to the British or
to open the road to Gilgit. The Takk incident, therefore, is not a part of the so-
called “Chitrál usurpation,” under which heading it immediately appears, but is
a part of our usurpation on the tribes inhabiting the banks of the Indus. In
1843, these tribes inflicted a severe loss on the Sikh invaders, and in my
“history of the wars with Kashmir” the part taken by the manly defenders of
Takk, now reduced from 131 to some 90 houses, is given in detail. It seems to
me that as the Gilgit force was unable to support “the Chitrál usurpation” of
our protégé, Afzul-ul-Mulk, owing to his being killed by his uncle Sher Afzul, it
is to be employed to coerce the Indus tribes to open out a road which ought
never to have been withdrawn from their hold. About 50 years ago the Takk
men were stirred into so-called rebellion by Kashmir agents in order to justify
annexation. It is to be hoped that history will not repeat itself, or that, at any
rate, the next 50 years will see the Indus tribes as independent and peaceful
as they have been since 1856, especially in Chilás (before 1892), and as
mysterious as Hunza ought to have remained till our unnecessary attack on
that country caused practically unknown Russia to be looked upon as the
Saviour of Nations “rightly struggling to be free” (see Baron Vrevsky’s reply to
the Hunza deputation). Quem Deus vult perdere, prius dementat; and no
greater instance of folly can be conceived, than the construction of a military
road through countries in which the chamois is often puzzled for its way. Nor
was the attention of the Russians drawn to them before we made our own
encroachments.
As for the Pamirs, whatever may be the present interpretation of Prince
Gortchakoff’s Convention, the Russians were unwilling to let political
consequences or limits accompany the erratic wanderings of Kirghiz sheep in
search of pasturage in that region. Prince Gortchakoff’s advocacy of a Neutral
Zone and of the autonomy of certain tribes was justified by the facts (which
he, however, rather guessed than knew) and was worthy alike of that
Diplomatist and of our acceptance in the interests of India and of peace. The
incorporation of certain Districts in the domain, or under the sphere of
influence, of Afghanistan, was distasteful to tribes attached to their hereditary
rulers or to republican institutions and was not too willingly accepted by the
Amir of Afghanistan, who now expects us to defend the white Elephants that
we have given him better than we did Panjdeh. Some Muláis that had fled
from Russian tyranny to Afghan territory assured me that “the finger of an
Afghan was more oppressive than the whole Russian army.” Indeed, so far as
Central Asia is concerned, Russia, with the exception of certain massacres,
has hitherto behaved, on the whole, as a great civilizing power.[109]
As for Sirdar Nizám-ul-Mulk, this is his name and not his title. He is the
“Mihtar” or “Prince” Nizám-ul-Mulk, and neither an Indian “Sirdár” nor a
“Nizám.” He is also the “Badshah” of Turikoh, this being the district assigned
to him in his father’s lifetime as the heir-apparent. He was snubbed by us for
offering to relieve that excellent officer, Col. Lockhart, when a prisoner in
Wakhan! He has written to me from Turikoh for “English phrases and words
with their Persian equivalents as a pleasure and a requirement.” This does not
look like hostility to the British. He spoke to me in 1886 of his brother Afzul’s
bravery with affection and pride, though he has ever maintained his own
acknowledged right as the successor of his father Amán-ul-Mulk. If he has
been alienated from us or has ever been tempted to throw himself into the
arms of Russia, it has most assuredly been our fault. Besides, just as we have
abandoned the Shiah Hazaras, our true friends during the late Afghan War, to
be destroyed by their religious and political foe, the Sunni Amir Abdurrahman,
so have the Amir Sher Ali and the Tham of Hunza, Safdar Ali Khan, rued their
trust in Russian Agents. I regret, therefore, to find in the Times telegram of
to-day that “the Nizám” “is acting without the support of the British Agent”
“who has not interfered,” when he had already interfered in favour of the
usurper Afzul-ul-Mulk.
As for the connivance of Amir Abdurrahman, my “rough history of Dardistan
from 1800 to 1872” shows that, in one sense, Chitrál is tributary to
Badakhshán and as we have assigned Badakhshán to the Amir, he, no doubt,
takes an interest in Chitrál affairs. I believe, however, that interest to be
somewhat platonic, and he knows that his friend Jehandár Shah (the late
wrongfully deposed hereditary ruler of Badakhshán) never paid any tribute to
Afghanistan. But Chitrál once also paid tribute to Dîr, with whose able Chief,
Rahmat-ullah-Khan, “the Nizám” is connected by marriage. Chitrál on the
other hand has received a subsidy from Kashmir since 1877, but this was as
much a tribute from Kashmir to Aman-ul-Mulk, as a sign of his subjection to
Kashmir, for shortly after he made offers of allegiance to Kabul. With all alike
it is

“The good old rule, the simple plan,


That they should take who have the power
And they should keep who can.”

It is misleading to speak of their relations to neighbouring States as


“tributary.” Are the Khyberis tributary to us or we to them, because we pay
them a tribute to let our merchants travel through their Pass? Have we never
ourselves come, first as suppliants, then as merchants, then as guests, then
as advisers, then as protectors, and, finally, as conquerors?
The procedure of Afghanistan, of Chitrál, of Kashmir, and of our own is very
much alike and so are the several radii of influence of the various factors in
“the question.” We have our fringe of independent frontier tribes with whom
we flirt, or wage war, as suits the convenience of the moment. Afghanistan
has a similar fringe of independent Ishmaelites round it and even through it,
whose hands are against everybody and everybody’s hands against them.
Chitrál is threatened all along its line by the Kafirs, who even make a part of
Badakhshán insecure, but are nevertheless our very good friends. Kashmir has
its fringe on its extreme border, especially since, in violation of our treaty of
1846, it has attacked countries beyond the Indus on the west, including the
Kunjûtis of Hunza, who resumed their raiding—which had ceased in 1867—
during and after Col. Lockhart’s visit in 1886. Yet there can be little doubt
about “the loyalty” of those concerned. The Amirs of Afghanistan consider
themselves “shields of India,” as I have heard two of them say, and so did our
Ally of Kashmir, who ought never to have been reduced to a subordinate
feudatory position. What wonder then that old Amán-ul-Mulk of Chitrál should
also have tried to become a buffer between Afghanistan on the West, Kashmir
on the East, India on the South and, latterly, Russia in the North, if indeed the
whole story of Russian intrigue in Chitrál be at all truer than a similar mare’s
nest which we discovered in Hunza? It is the policy of Russia to create false
alarms and thereby to involve us in expenditure, whilst standing by and
posing as the future saviour of the tribes. Our tendency to compromises and
subservient Commissions of delimitation and to “scuttling” occasionally, is also
well known and so we are offered in Russian papers “an Anglo-Russian
understanding on the subject of Chitrál,” as if Chitrál was not altogether out of
the sphere of Russia’s legitimate influence! It is also amusing to find in the
Novosti that Russia’s sole desire is “to prevent Afghanistan from falling into
British hands.” We are already spending at Gilgit on food etc. for our troops
more in one year than were spent in the 40 years of the so-called
mismanagement of Kashmir, which I myself steadily exposed, but which kept
the frontier far more quiet than it has been since the revival of the Gilgit
Agency. There is every prospect now of heavier and continued expenditure as
the policy of the Foreign Department of the Government of India develops. On
that policy a veto should at once be put by the British Parliament and public, if
our present Liberal Administration cannot do so without pressure from
without. We should conciliate Nizam-ul-Mulk before it is too late. He is
connected with Umra Khan of Jandôl and with the influential Mullah Shahu of
Bajaur through his maternal uncle, Kokhan Beg. He has also connections in
Badakhshan, Hunza and Dîr, as already stated. Indeed, we ought to have
given him our support from the beginning. I doubt whether it would be
desirable to subdivide Chitrál as stated in to-day’s Times, letting Sher Afzul
keep Chitrál proper, giving Yasin to “the Nizám” and letting Umra Khan retain
what he has already seized of Southern Chitrál. As for Sher Afzul, I believe,
that he is also “loyal.”
As for Hunza, I am not at all certain that the fugitive, Safdar Ali Khan, really
murdered his father. At all events when the deed was committed, I find that it
was attributed to Muhammad Khan,[110] probably not the present Mir
Muhammad Nazim who has acknowledged the suzerainty of England (through
Kashmir) and of China. The latter power has always had something to say to
Hunza, and the very title of its Chief “Tham” is of Chinese origin. The subsidy
that China used to pay for keeping open the commercial road from
Badakhshan and Wakhan through the Pamirs along Kunjût (Hunza) to
Yarkand, was about £380 per annum, and this sum was divided between four
States and ensured the immunity of the route from raids.[111] I doubt whether
in future £380 a year on Hunza alone will enable us to keep it quiet, and I am
sure that the lofty superciliousness with which Chinese officials discuss the
Pamir question, as something that scarcely concerns them, is no evidence of
that pertinacious power abandoning claims to a suzerainty in those regions
which are historically founded, although their exercise has been more by an
appeal to imagination of the glorious and invincible, if distant, “Khitái,” than
by actual interference.
Indeed, it is China alone that has a grievance—against Russia for the
occupation of the Alichur Pamir—against Afghanistan for expelling her troops
from Somatash (of subsequent Yanoff fame)—and against England for
encroaching on her ancient feudatory of Hunza, whose services in suppressing
the Khoja rebellion in 1847 are commemorated in a tablet on one of the gates
of Yarkand.

H. H. Mihtar Nizam-ul-Mulk and his late Yasin Council.


Chitrali Musicians and the Badakshi Poet, Taighun Shah.

Note.—We add a reproduction of the photographs of the Mihtar and


Badshah Nizam-ul-Mulk, sitting in Council with his uncle, Bahadur Khan, now
at Gilgit, where he represented Afzul-ul-Mulk. On the Nizam’s left is his foster-
uncle, Maimun Shah, whilst behind him stand our Indian Agent, Wafadár Khan
and a Chitráli office-holder, Wazîr Khan, of corresponding rank. We also give
the portrait of the Chitrál Court poet and musician, the celebrated Taighûn
Shah, one of whose songs, with its notation, was published in our issue of the
1st of January, 1891. He is seated with the two flute-players who always
precede the King of Chitrál when on a tour.

Although the period may be past in which a great English Journal could ask,
“what is Gilgit?” the contradictory telegrams and newspaper accounts which
we receive regarding the countries adjoining Gilgit show that the Press has
still much to learn. Names of places, as far apart as Edinburgh and London,
are put within a day’s march on foot. Names of men figure on maps as places
and the relationships of the Chiefs of the region in question are invented or
confounded as may suit the politics of the moment, if not the capacity of the
printer. The injunctions of the Decalogue are applied or misapplied, extended
or curtailed, to suit immediate convenience, and a different standard of
morality is constantly being found for our friends of to-day or our foes of to-
morrow. The youth Afzul-ul-Mulk was credited with all human virtues and with
even more than British manliness, as he was supposed to be friendly to us. He
had given his country into our hands in order to receive our support against
his elder brother, the acknowledged heir of the late Aman-ul-Mulk of Chitrál,
but that elder brother, Nizám-ul-Mulk, was no less friendly to English interests,
although he has the advantage of being a man of capacity and independence.
The sudden death of Aman-ul-Mulk coincided with the presence of our
protégé at Chitrál, and the first thing that the virtuous Afzul-ul-Mulk did, was
to invite as many brothers as were within reach to a banquet when he
murdered them. No doubt, as a single-minded potentate, he did not wish to
be diverted from the task of governing his country by the performance of
social duties to the large circle of acquaintances in brothers and their families
which Providence bestows on a native ruler or claimant in Chitrál and Yasin. A
member of the Khush-waqtia dynasty of Yasin, which is a branch of the Chitrál
dynasty, told me when I expressed my astonishment at the constant murders
in his family: “A real relative in a high family is a person whom God points out
to one to kill as an obstacle in one’s way, whereas a foster-relative (generally
of a lower class) is a true friend who rises and falls with one’s own fortune” (it
being the custom for a scion of a noble house to be given out to a nurse.)

The dynasty of Chitral is said to have been established by Baba Ayub, an


adventurer of Khorassan. He adopted the already existing name of Katór,
whence the dynasty is called Katore. The Emperor Baber refers to the country
of Katór in his Memoirs and a still more ancient origin has been found in
identifying Katór with “Kitolo, the King of the Great Yuechi, who, in the
beginning of the 5th century, conquered Balkh and Gandhara, and whose son
established the Kingdom of the Little Yuechi, at Peshawur.” (See Biddulph’s
“Tribes of the Hindoo Koosh,” page 148.) General Cunningham asserts that the
King of Chitrál takes the title of Shah Kator, which has been held for nearly
2,000 years, and the story of their descent from Alexander may be traced to
the fact that they were the successors of the Indo-Grecian Kings in the Kabul
valley. If Katór is a corruption of Kaisar, then let it not be said that the
remnant of the Katore exclaimed with the Roman gladiator: “Ave, Kaisar-i-
Hind, morituri te salutant.”
Amán-ul-Mulk, the late ruler of Chitrál, was, indeed, a terrible man, who to
extraordinary courage joined the arts of the diplomatist. He succeeded his
elder brother, surnamed Adam-Khôr or “man-eater.” His younger brother, Mir
Afzul, is said to have been killed by him or to have committed a convenient
suicide; another brother, Sher Afzul, who is now in possession of Chitrál, was
long a fugitive in Badakhshan whence he has just returned with a few
Afghans (such as any pretender can ever collect) and a hundred of the Chitráli
slaves that used to be given in tribute to the Mir of Badakhshan, which itself
never paid a tribute to Kabul before the late Sher Ali of Afghanistan installed
Mahmud Shah, who expelled his predecessor Jehandar Shah, the friend of
Abdur-Rahman, the present Amir of Afghanistan. Another brother of Aman-ul-
Mulk was Kokhan Beg, whose daughter married the celebrated Mullah Shahu
Baba, a man of considerable influence in Bajaur, who is feared by the Badshah
of Kunar (a feudatory of Kabul and a friend of the British) and is an enemy of
the Kamôji Kafirs, that infest one of the roads to Chitrál. This Kokhan Beg,
who was a maternal uncle of Afzul-ul-Mulk, was killed the other day by his
brother Sher Afzul coming from Badakhshan. I mention all this, as in the
troubles that are preparing, the ramifications of the interests of the various
pretenders are a matter of importance. Other brothers of Aman-ul-Mulk are:
Muhammad Ali (Moriki), Yádgar Beg, Shádman Beg and Bahádur Khán (all by
a mother of lower degree), and another Bahádur Khán, who was on the
Council of Nizám-ul-Mulk. Nizám-ul-Mulk has therefore to contend with one or
more of his uncles, and by to-day’s telegram[112] is on his way to the Chitrál
Fort in order to expel Sher Afzul with the aid of the very troops that Sher Afzul
had sent to turn out Afzul-ul-Mulk’s Governor from Yasin. I believe that Nizám-
ul-Mulk has or had two elder half-brothers, Gholam of Oyôn and Majid
Dastagir of Drôshp; but, in any case, he was the eldest legitimate son and,
according to Chitrál custom, was invested with the title of Badshah of Turikoh,
the rule of which valley compelled his absence from Chitrál and not “his
wicked and intriguing disposition” as alleged by certain Anglo-Indian journals.
Of other brothers of Nizám-ul-Mulk was Shah Mulk (of lower birth), who was
Governor of Daraung and was killed by Afzul-ul-Mulk. He used to live at Dros
(near Pathan in Shashi). Afzul-ul-Mulk of Drasun, whom we have already
mentioned as a wholesale fratricide, was killed in his flight to one of the
towers of the Chitrál Fort from the invading force of his uncle, Sher Afzul of
Badakhshan. A younger half-brother is also Behram-ul-Mulk (by a lower
mother), called “Viláyeti,” of Moroi in Andarti. Other brothers are: Amin-ul-
Mulk, a brother of good birth of Oyôn (Shoghôt), who was reared by a woman
of the Zondré or highest class; Wazir-ul-Mulk (of low birth) of Brôz; Abdur-
Rahman (low-born) at Owir (Barpèsh), and Badshah-i-Mulk, also of Owir, who
was reared by the wife of Fath-Ali Shah. There are no doubt other brothers
also whose names I do not know. Murid, who was killed by Sher Afzul, is also
an illegitimate brother.
A few words regarding the places mentioned in recent telegrams may be
interesting: Shogôth is the name of a village, of a fort, and of a district which
is the north-western part of Chitrál, and it also comprises the Ludkho and
tributary valleys. Through the district is the road leading to the Dara and
Nuqsán passes, to the right and left respectively, at the bottom of which is a
lake on which official toadyism has inflicted the name of Dufferin in
supersession of the local name. Darushp (Drôshp) is another big village in this
district and in the Ludkho valley, and Andarti is a Fort in it within a mile of the
Kafir frontier. The inhabitants of Shogôth are descendants of Munjanis, whose
dialect (Yidgah) I refer to elsewhere, and chiefly profess to be Shiahs, in
consequence of which they have been largely exported as slaves by their
Sunni rulers. Baidam Khan, a natural son of Aman-ul-Mulk, was the ruler of it.
The Ludkho valley is traversed by the Arkari river which falls into that of
Chitrál. At the head of the Arkari valley are three passes over the Hindukhush,
including the evil-omened “Nuqsán,” which leads to Zeibak, the home of the
heretical Maulais (co-religionists of the Assassins of the Crusades) in
Badakhshán. It is shorter, more direct, and freer from Kafir raids than the
longer and easier Dora pass. Owir is a village of 100 houses on the Arkari
river, and is about 36 miles from Zeibak. Drasan is both the name of a large
village and of a fort which commands the Turikoh valley, a subdivision of the
Drasan District, which is the seat of the heir-apparent to the Chitrál throne
(Nizám-ul-Mulk). Yet the Pioneer, in its issue of the 5th October last, considers
that Lord Lansdowne had settled the question of succession in favour of Afzul-
ul-Mulk, that Nizám-ul-Mulk would thus be driven to seek Russian aid, but that
any such aid would be an infringement of the rights of Abdur-Rahman. Now
that Abdur-Rahman is suspected, on the flimsiest possible evidence, to have
connived at Sher Afzul’s invasion of Chitrál, we seek to pick a quarrel with him
for what a few weeks ago was considered an assertion of his rights. Let it be
repeated once for always that if ever Abdur-Rahman or Nizám-ul-Mulk, or the
Chief of Hunza or Kashmir or Upper India fall into the arms of Russia, it will be
maxima nostra culpa. I know the Amir Abdur-Rahman, as I knew the Amir
Sher Ali, as I know Nizám-ul-Mulk, and of all I can assert that no truer friends
to England existed in Asia than these Chiefs. Should Abdur-Rahman be
alienated, as Sher Ali was, or Nizám-ul-Mulk might be, it will be entirely in
consequence of our meddlesomeness and our provocations. Russia has
merely to start a will-o’-the-wisp conversation between Grombcheffsky and
the Chief of Hunza, when there is internal evidence that Grombcheffsky was
never in Hunza at all, and certainly never went there by the Muztagh Pass,
that we, ignoring the right of China and of the treaty with Kashmir in 1846,
forgetful of the danger in our rear and the undesirability of paving for an
invader the road in front, fasten a quarrel on Hunza-Nagyr, and slaughter its
inhabitants. No abuse or misrepresentation was spared in order to inflame the
British public even against friendly and inoffensive Nagyr. What wonder that a
Deputation was sent from Hunza to seek Russian aid and that it returned
contented with presents, and public expressions of sympathy which explained
away the Russian official refusal as softened by private assurances of
friendship? Whatever may be the disaster to civilization in the ascendancy of
Russian rule, the personal behaviour of Russian agents in Central Asia is,
generally, pleasant. As in Hunza, so in Afghanistan, some strange suspicion of
the disloyalty of its Chief, suggested by Russia, may involve us in a senseless
war and inordinate expense, with the eventual result that Afghanistan must
be divided between England and Russia, and their frontiers in Asia become
conterminous. Then will it be impossible for England ever to oppose Russia in
Europe, because fear of complications in Asia will paralyze her. Then the
tenure of India will depend on concessions, for which that country is not yet
ripe, or on a reign of terror, either course ending in the withdrawal of British
administration from, at any rate, Northern India. Yet it is “Fas ab hosti doceri,”
and when Prince Gortschakoff urged the establishment of a neutral zone with
autonomous states, including Badakhshan, he advocated a policy that would
have conducted to centuries of peace and to the preservation of various
ancient forms of indigenous Oriental civilization by interposing the mysterious
blanks of the Pamirs and the inaccessible countries of the Hindukush between
Russian and British aggression.

Instead of this consummation so devoutly to be wished, and possible even


now, though late, if action be taken under good advice and in the fulness of
knowledge, either Power—

“Thus with his stealthy pace


With Tarquin’s ravishing strides, towards his design
Moves like a ghost.”
If ever the pot called the kettle black, it is the story of Anglo-Russian
recriminations. Russian intrigues are ever met by British manœuvres and
Muscovite earth-hunger can only be paralleled by English annexations. Here a
tribe is instigated to revolt, so that its extermination may “rectify a boundary,”
there an illusory scientific frontier is gradually created by encroachments on
the territories of feudatories accused of disloyalty, if not of attempts to poison
our agents. By setting son against father, brother against brother and, in the
general tumult, destroying intervening republics and monarchies, Anglo-
Russian dominions are becoming conterminous. Above all

“There’s not a one of them but in his house


I keep a servant fee’d.”

And it is this unremitting suspicion which is alike the secret of present


success and the cause of eventual failure in wresting and keeping Asiatic
countries and of the undying hatred which injured natives feel towards
Europeans.
The attempt to obtain the surrender of the Takk fort, and of the Takk valley,
a short and easy road to the British District of Kaghán, has merely indicated to
Russia the nearest way to India, just as we forced her attention to Hunza and
are now drawing it to Chitrál. David Urquhart used to accuse us of conspiracy
with Russia in foreign politics. Lord Dufferin in his Belfast speech sought the
safety of India in his friendship with M. de Giers and his Secretary popularized
Russia in India by getting his work on “Russia” translated into Urdu. Certainly
the coincidence of Russian as well as British officials being benefited by their
respective encroachments, Commissions, Delimitations, etc., would show their
“mutual interest” to consist in keeping up the farce of “Cox and Box” in
Central Asia, which must end in a tragedy.
As an official since 1855, when I served Her Majesty during the Russian
War, I wish to warn the British public against the will-o’-the-wisp of our
foreign policy, especially in India. I can conceive that a small, moral and
happy people should seek the ascendancy of its principles, even if
accompanied by confusion in the camps of its enemies. I can understand that
the doctrines of Free Trade, of a free Press, a Parliamentary rule, the Anti-
Slavery propaganda and philanthropic enterprises generally, with which the
British name is connected, should have been as good as an army to us in
every country of the world in which they created a Liberal party, but these
doctrines have often weakened foreign Executive Governments, whilst “Free
Trade” ruined their native manufacture. What I, however, cannot understand
is that a swarming, starving and unhappy population should seek consolation
for misery at home in Quixotism abroad, especially when that Quixotism is
played out. If bread costs as much now as in 1832 although the price of
wheat has fallen from 60s. to 27s. a quarter, it is, indeed, high time that we
should lavish no more blood and treasure on the stones of foreign politics, but
that we should first extract the beam from our own eye before we try to take
out the mote from the eye of others.
What these foreign politics are worth may be inferred from the growing
distrust on the Continent of British meddlesomeness or from what we should
ourselves feel if even so kindred a race as the Prussians sought to monopolize
British wealth and positions. It would be worse, if they did so without
possessing a thorough knowledge of the English language or of British
institutions. Yet we are not filled with misgivings when our Indian Viceroys or
Secretaries of State cannot speak Hindustani, the lingua franca of India or
when an Under-Secretary has a difficulty in finding Calcutta on the Map.
India should be governed in the fulness of knowledge and sympathy, not by
short cuts. It should not be the preserve of a Class, but the one proud boast
of its many and varied peoples. When Her Majesty assumed Her Indian title, it
was by a mere accident, in which pars magna fui, at the last moment, that
the Proclamation was translated to those whom it concerned at the Imperial
Assemblage. This superciliousness, wherever we can safely show it, the
cynical abandonment of our friends, the breach of pledges, the constant
experimentalizing on the natives, the mysteriousness that conceals official
ignorance, is the enemy to British rule in India, not Russia. A powerful Empire
can afford to discard the arts of the weak, and should even “show its hand.”
India should be ruled by a permanent Viceroy, a member of the Royal family,
not by one whom the exigencies of party can appoint and shift. When in 1869
the Chiefs and people of the Panjab deputed me to submit their petition that
H.R.H. the Prince of Wales be pleased to visit India, it was because they felt
that it was desirable in the interests of loyalty to the Throne. If it be true that
H.R.H. the Duke of Connaught is going out as the next Viceroy, I can only say
that the longer his admirers miss him in England, the better for India, which
requires its best interests to be grouped round a permanent Chief.

Dec. 7th.—As for the wanton aggression on Chilás which never gave us the
least trouble, as all our Deputy Commissioners of Abbottabad can testify, it is
a sequel of our interference last year with Hunza-Nagyr. The Gilgit Residency
has disturbed a peace that has existed since 1856 and now continues in its
Welcome to Our Bookstore - The Ultimate Destination for Book Lovers
Are you passionate about books and eager to explore new worlds of
knowledge? At our website, we offer a vast collection of books that
cater to every interest and age group. From classic literature to
specialized publications, self-help books, and children’s stories, we
have it all! Each book is a gateway to new adventures, helping you
expand your knowledge and nourish your soul
Experience Convenient and Enjoyable Book Shopping Our website is more
than just an online bookstore—it’s a bridge connecting readers to the
timeless values of culture and wisdom. With a sleek and user-friendly
interface and a smart search system, you can find your favorite books
quickly and easily. Enjoy special promotions, fast home delivery, and
a seamless shopping experience that saves you time and enhances your
love for reading.
Let us accompany you on the journey of exploring knowledge and
personal growth!

ebookgate.com

You might also like