MATLAB Machine Learning Recipes: A Problem-Solution Approach 2nd Edition Michael Paluszek instant download
MATLAB Machine Learning Recipes: A Problem-Solution Approach 2nd Edition Michael Paluszek instant download
https://textbookfull.com/product/matlab-machine-learning-recipes-
a-problem-solution-approach-2nd-edition-michael-paluszek/
https://textbookfull.com/product/matlab-machine-learning-recipes-
a-problem-solution-approach-3rd-edition-michael-paluszek/
https://textbookfull.com/product/matlab-recipes-a-problem-
solution-approach-2nd-edition-michael-paluszek/
https://textbookfull.com/product/matlab-machine-learning-1st-
edition-michael-paluszek/
https://textbookfull.com/product/android-recipes-a-problem-
solution-approach-dave-smith/
Raku Recipes: A Problem-Solution Approach J.J. Merelo
https://textbookfull.com/product/raku-recipes-a-problem-solution-
approach-j-j-merelo/
https://textbookfull.com/product/c-recipes-a-problem-solution-
approach-1st-edition-shirish-chavan/
https://textbookfull.com/product/javascript-recipes-a-problem-
solution-approach-1st-edition-russ-ferguson/
https://textbookfull.com/product/wxpython-recipes-a-problem-
solution-approach-1st-edition-mike-driscoll/
https://textbookfull.com/product/java-9-recipes-a-problem-
solution-approach-3rd-edition-josh-juneau/
MATLAB Machine
Learning Recipes
A Problem-Solution Approach
Second Edition
—
Michael Paluszek
Stephanie Thomas
MATLAB Machine
Learning Recipes
A Problem-Solution Approach
Second Edition
Michael Paluszek
Stephanie Thomas
MATLAB Machine Learning Recipes: A Problem-
Solution Approach
Michael Paluszek
Stephanie Thomas
Plainsboro, NJ
Plainsboro, NJ
USA
USA
https://doi.org/10.1007/978-1-4842-3916-2
This work is subject to copyright. All rights are reserved by the Publis
her, whether the whole or part of the material is
concerned, specifically the rights of translation, reprinting, reuse of ill
ustrations, recitation, broadcasting, reproduction on
microfilms or in any other physical way, and transmission or informati
on storage and retrieval, electronic adaptation,
computer software, or by similar or dissimilar methodology now know
n or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rat
her than use a trademark symbol with every
occurrence of a trademarked name, logo, or image we use the names
, logos, and images only in an editorial fashion and to
the benefit of the trademark owner, with no intention of infringement
of the trademark.
While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the
authors nor the editors nor the publisher can accept any legal respon
sibility for any errors or omissions that may be made.
www.apress.com/source-
code/. Readers can also access source code at SpringerLink in the Su
pplementary Material section for each chapter.
Contents
XV
Introduction
XVII
1
1.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2
1.2.1
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.2
Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3
Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2.3.1
Supervised Learning . . . . . . . . . . . . . . . . . . . .
1.2.3.2
Unsupervised Learning . . . . . . . . . . . . . . . . . . .
4
1.2.3.3
Semi-Supervised Learning . . . . . . . . . . . . . . . . .
1.2.3.4
Online Learning . . . . . . . . . . . . . . . . . . . . . . .
1.3
1.4
1.5
Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.1
Kalman Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.5.2
Adaptive Control . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.6
1.6.1
Regression
..............................
10
1.6.2
Decision Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . .
13
1.6.3
Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
1.6.4
15
1.7
Artificial Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
1.7.1
16
1.7.2
Intelligent Cars . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16
1.7.3
Expert Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .
17
1.8
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
III
CONTENTS
19
2.1
Introduction to MATLAB Data Types . . . . . . . . . . . . . . . . . . . . .
19
2.1.1
Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.1.2
Cell Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.1.3
Data Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21
2.1.4
Numerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
2.1.5
Images
................................
23
2.1.6
Datastore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
25
2.1.7
Tall Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
2.1.8
Sparse Matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
2.1.9
27
2.1.10
Large MAT-Files . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
2.2
30
2.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
2.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
2.2.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
30
2.3
33
2.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
2.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
2.3.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33
2.4
35
2.4.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
2.4.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
2.4.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
36
2.5
.............................
37
2.5.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
37
2.5.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
2.5.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38
2.6
41
2.6.1
String Concatenation . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.1.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.1.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.1.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.2
Arrays of Strings . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.2.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . .
41
2.6.3
Substrings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.6.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.6.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.6.3.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . .
42
2.7
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
43
IV
CONTENTS
MATLAB Graphics
45
3.1
2D Line Plots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
3.1.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
3.1.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
45
3.1.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
46
3.2
General 2D Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
3.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
3.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
3.2.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
48
3.3
50
3.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
3.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
3.3.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
50
3.4
Three-Dimensional Box
............................
51
3.4.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
3.4.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
3.4.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
52
3.5
Draw a 3D Object with a Texture . . . . . . . . . . . . . . . . . . . . . . . .
54
3.5.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
3.5.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
54
3.5.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55
3.6
General 3D Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
3.6.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
3.6.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
3.6.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
56
3.7
Building a GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
3.7.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
3.7.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
3.7.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
3.8
63
3.8.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
3.8.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
3.8.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
64
3.9
Drawing a Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.9.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.9.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.9.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.10
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
71
CONTENTS
Kalman Filters
73
4.1
74
4.1.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
4.1.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
4.1.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
75
4.2
92
4.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
92
4.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93
4.2.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93
4.3
...........
97
4.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
4.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
97
4.3.3
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
99
4.4
. . . . . . . . . . . . . . . . . . . 104
4.4.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
4.4.3
4.5
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Adaptive Control
109
5.1
5.2
5.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
5.2.3
5.3
. . . . . . . . . . . . . . . . 117
5.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
5.3.3
5.4
Generating a Square Wave Input . . . . . . . . . . . . . . . . . . . . . . . . 12
1
5.4.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.4.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5.4.3
5.5
5.5.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5.5.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5.5.3
5.6
of a Ship . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.6.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.6.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.6.3
VI
CONTENTS
5.7
5.7.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.7.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.7.3
5.8
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Fuzzy Logic
135
6.1
6.1.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.1.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
6.1.3
6.2
6.2.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6.2.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6.2.3
6.3
6.3.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.3.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
6.3.3
6.4
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
147
7.1
7.1.1
Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
7.1.2
Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
7.1.3
7.2
The treaty was never ratified by Great Britain, but such endeavors on the
part of a strong maritime European power made it necessary for Spain to act
decisively and expeditiously. Urbiztondo then pressed to the attention of
Sultan Pulalun and his council the necessity of punishing the Samals of
Tonkil for their depredations on Samar and Kamigin and requested the
return of the captives whom they carried away. Considerable controversy
followed and the Sulus pretended that they were unable to punish Tonkil,
but offered no objection to its castigation by the Philippine Government.
His [the Sultan’s] fortified position gave him weight, which he had frequently
thrown into the scale of humanity: and it must now be feared that many whom he
was able to hold in check will again follow their evil propensities unrestrained, as
they did under previous dynasties.
The resentment of Spain, as visited upon the Sultan of Sulu, seems equally
impolitic and unjust. The pretext was piracy, of which some solitary instance may
very possibly have been established against a Sulu prahu; but the Sultan was
certainly sincere in his wish to coöperate against that system. There is ground to
fear that national jealousy was desirous of striking its puny blow at an European
rival, through the degradation of the Sultan of Sulu—that he has incurred, in fact,
the resentment of the Spanish colonial governors, by those commercial treaties
with ourselves which were but lately concluded by Sir James Brooke.2
Jolo was well fortified. It had five forts on the sea front, the strongest two of
which were that of the Sultan on the right and that of Datu Daniel on the
hill. Three other forts were located on prominent points at the base of the
hills. The town was further defended by a double line of trenches, other
fortifications and much artillery. The population was estimated at 6,000
Moros and 500 Chinese.
The fleet saluted the town and anchored in the roadstead. Two officers were
sent ashore to notify the Sultan of the presence of the Governor-General and
of his wish to have an interview with the Sultan and two of his datus, on
board. The people were excited to such a high degree, that the mob grew
violent and uncontrollable as the officers drew near the shore. Insults and
weapons were hurled at them from every side, and the people shouted to
them to return lest they be killed. They, however, pushed on in the direction
of the Sultan’s fort, where some datus came out to meet and protect them.
Even then spears were thrown at them, and one of the datus had to use his
kampilan in order to enforce his orders. The Sultan at last came out
personally, embraced the officers, and conducted them to the audience hall.
There the message was delivered to the Sultan and his council, but they all
refused to go on board. The officers met the same difficulty in leaving the
Sultan’s house as in coming in, and as soon as they embarked five shots
were discharged at them by the mob. The officers reported that the town
had more than 10,000 fighting men and that it was well provisioned and
well defended, and that all the women and children were removed to the
mountains. Urbiztondo decided that his forces and provisions were
inadequate for the occasion and did not risk a combat. On January 1, 1851,
as the fleet was preparing to sail away, the Sulus fired at it, killing seven,
wounding four, and damaging the hulls of some of the vessels. The fleet
returned the fire, but kept moving, and sailed away in the direction of
Tonkil. Here the expedition met no organized resistance. Six hundred men
were disembarked, fought some armed parties, caught 4 and killed 25 men,
and rescued 29 captives. About 1,000 houses and 106 boats were burned,
and the fleet then returned to Zamboanga.
In consideration of the losses incurred by the Sultan and datus through the
destruction of their houses and town, and on condition that the Sulus aid in
the construction and protection of the Jolo trading post, annuities were
granted to the Sultan, three datus, and one subordinate chief.
The treaty was written in both Spanish and Sulu and was signed and sealed
by both parties. Complete and exact translations of the Spanish and Sulu
copies of this treaty have been carefully made and are here given in full.
The Sulu copy of the treaty appears to have been written or dictated by
interpreters not versed in Sulu, and the difference in text is such as would
easily explain the frequent misunderstandings between the Spanish officials
and the Sulu authorities in cases pertaining to the application of the terms of
this treaty.
Article I. His Excellency the Sultan of Sulu, for himself, his heirs and
descendants, Datus Mohammed Buyuk, Muluk, Daniel Amil Bahar, Bandahala,
Muluk Kahar, Amil Badar, Tumanggung, Juhan, Sanajahan, Na’ib, Mamancha
and Sharif Mohammed Binsarin, all of their own free will, declare: That, for the
purpose of making amends to the Spanish Nation for the outrage committed
against it on the first of January of this year, they desire and request that the island
of Jolo and all its dependencies be incorporated with the Crown of Spain, which
for several centuries has been their only sovereign and protectress, making on this
day a new solemn declaration of adhesion and submission and recognizing Her
Catholic Majesty Isabel II, Constitutional Queen of Spain, and those who may
succeed her in this supreme dignity, as their rightful Sovereign Lords and
Protectors, in virtue of the treaties made in old times, of the treaty of 1836 and the
additions made thereto by the present governor of Zamboanga in August, and also
and very particularly of the recent conquest of Jolo on the 28th of February of the
present year by Captain-General Antonio Urbiztondo, Marquis of Solana and
Governor-General of the Philippine Islands.
Article 2. The Sultan and Datus solemnly promise to maintain the integrity of
the territory of Sulu and all its dependencies as a part of the Archipelago
belonging to the Spanish Government.
Article 3. The island of Sulu and all its dependencies having been incorporated
with the Crown of Spain, and the inhabitants thereof being part of the great
Spanish family which lives in the vast Philippine Archipelago, the Sultan and
Datus shall not be empowered to make or sign treaties, commercial agreements or
alliances of any kind with European powers, companies, persons or corporations,
and Malayan sultans or chiefs, under pain of nullity; they declare all treaties made
with other powers to be null and void if they are prejudicial to the ancient and
indisputable rights held by Spain over the entire Sulu Archipelago as part of the
Philippine Islands, and they ratify, renew and leave in force all documents
containing clauses favorable to the Spanish Government that may have been
drawn up before this date, however old they may be.
Article 4. They renew the solemn promise not to carry on piracy or allow
anybody to carry on piracy within the dominions of Sulu, and to run down those
who follow this infamous calling, declaring themselves enemies of all islands that
are enemies of Spain and allies of all her friends.
Article 5. From this day forth the island of Sulu shall fly the Spanish national
flag in its towns and on its ships, and the Sultan and other constituted authorities
shall use the Spanish war flag, under the principles in use in other Spanish
possessions, and shall use no other either on land or on sea.
Article 6. The island of Sulu and its dependencies having been declared an
integral part of the Philippine Archipelago, which belongs to Spain, commerce
under the Spanish flag in all the ports of the Sultanate shall be free and
unmolested, as it is in all the ports belonging to the Nation.
Article 7. The Sultan and Datus of Sulu, having recognized the sovereignty of
Spain over their territory, which sovereignty is now strongly established, not only
by right of conquest but by the clemency of the conqueror, they shall not erect
fortifications of any kind in the territory under their command without express
permission of His Excellency the Governor-General of these Islands; the purchase
and use of all kinds of firearms shall be prohibited except with a license issued by
the same supreme authority, and craft found with arms other than the edged
weapons which have from time immemorial been in use in the country shall be
considered as enemies.
Article 9. The Spanish Government guarantees with all solemnity to the Sultan
and other inhabitants of Sulu the free exercise of their religion, with which it will
not interfere in the slightest way, and it will also respect their customs.
Article 10. The Spanish Government also guarantees the right of succession to
the present Sultan and his descendants in the order established and as long as they
observe these agreements, and equally guarantees the rank and dignities of the
privileged classes, which shall retain all their rights.
Article 11. Sulu ships and goods shall enjoy in Spanish ports, without any
distinction whatever, the same privileges and advantages granted the natives of
the Philippine Islands.
Article 12. Except in the case of Spanish ships, the duties that constitute the
income with which the Sultan and Datus maintain their respective ranks shall
remain in force, so that they may continue to keep up the proper splendor and
decorum of their station; for this purpose said duties shall be paid by all ships
coming to their ports; other measures will be taken later on to enhance their
dignity and increase their prestige.
Article 13. For the purpose of assuring and strengthening the authority of the
Sultan, and also of promoting a regular trade which may enrich the island of Sulu,
a trading post, garrisoned by Spanish forces, shall be established as soon as the
Government so orders, and in accordance with Article 3 of the Treaty of 1836; for
the building of the trading post the Sultan, Datus, and natives shall give all the
assistance in their power and furnish native labor, which will be paid for, and all
necessary materials, which they will charge at the regular market prices.
Article 14. The trading post shall be established at the place called Daniel’s
Kuta, next to the roadstead, as it is the most suitable place; but care shall be taken
not to encroach in any way on the native cemetery, which has to be religiously
respected, and no buildings whatever shall be erected in said cemetery, so as to
avoid the trouble that would ensue to those who might build there.
Article 15. The Sultan of Sulu may issue passports to all persons within his
dominions that may request them, and fix the amount of the fees; he is also
authorized to countersign or place his seal on the passports of Spaniards visiting
his place of residence.
Article 16. In view of the Sultan’s declarations regarding the losses suffered by
him in the destruction by fire of his forts and palace, and convinced of the reality
of the losses, the Spanish Government grants him an annuity of 1,500 pesos in
order to indemnify him in a certain way for these losses and at the same time to
help him to maintain, with proper splendor, the decorum due his person and his
rank. The same considerations induce the Spanish Government to grant Datu
Mohammed Buyuk, Muluk and Datu Daniel Amil Bahar 600 pesos per annum
each, and 360 pesos to Sharif Mohammed Binsarin on account of his good
services to the Spanish Government.
Article 17. The articles contained in this solemn Act shall go this day into full
effect, subject however to the superior approval of His Excellency the Governor-
General of these Philippine Islands. Any doubt which may arise in regard to the
text of this Act shall be resolved by adhering to the literal meaning of the Spanish
text.
Royal order approving the salaries assigned to the Sultan and Datus of Sulu,
December 14, 1851.
The Queen (whom God save), in view of the letter of Your Excellency of May 3rd
last, No. 1236, and of the report of the Secretary of State on the subject, has been
pleased to approve the salaries assigned by Article 16 of the Capitulation to the
Sultan and Datus of Sulu, and amounting to 1,500 pesos for the Sultan, 600 pesos
for each of the Datus Mohammed Buyuk Muluk and Daniel Amil Bahar, and 360
for Sharif Binsarin.
A statement of firm agreement and union (in friendship) made by the Queen Spain
Isabel II, Constitutional Queen of all Spain, and the honorable officers of her
government, with the Mawlana Sultan Mohammed Pulalun and the Datus
Mohammed Buyuk, Muluk, Amil Bahar, Bandahala, Muluk Kahar, Amil Badar,
Tumanggung, Juhan, Sawja’an, Na’ib, Mamancha, and Tuan Sharif Mohammed
Binsarin.
The King was represented here by Colonel Don José María de Carlos y O’Doyle,
Politico-Military Governor of the Province of Zamboanga and islands of Basilan,
Pilas, Tonkil, and others, who was given power and authority by General Don
Antonio de Urbiztondo, Marquis of Solana, Governor and Great Captain of the
Philippine Islands.
Article I. The Mahasari Mawlana Sultan of Sulu and his ministers together with
the datus mentioned above have the great desire to state that they had good
intentions toward the people of Spain, on January 1, of this year. They also state
that the relation of Sulu and its dependencies to Spain has been one of intimate
union from the first until now.
They make anew, to-day, a firm agreement of union in friendship with the Queen
of Spain Isabel II, Constitutional Queen of All Spain, and all her honorable
officers, to reaffirm the previous agreement of 1836, as also the agreement of last
year made with the governor of Zamboanga, in the month of August, which fully
affirmed the “Kunkista”5 of Sulu which was effected on the 28th of February, this
year, by Señor the excellent Don Antonio Urbiztondo, Marquis of Solana,
Governor and great Captain of the Philippine Archipelago.
Article II. The Sultan and Datus promise with firm intention and brotherhood
not to revoke their agreement to the occupation of Sulu and its dependencies,
regarding them as dependencies of Spain.
Article III. Sulu and her dependencies alike use the Spanish flag; the people of
Sulu and her dependencies are one with the people of Spain, and ally themselves
to the Philippine Islands.
It shall not be right for the Sultan and the Datus to make treaties with Malay datus
or any nation other than Spain, whether that nation is Spain’s ally or not. Should
such treaties be made they would be null. So also they can not make any contracts
with any persons other than Spaniards, nor any agreement contrary to the previous
ones. Such agreements, if made, will not be binding because Spain is in all the
islands of Sulu as she is in her Philippine Islands, and Sulu has previous
friendship treaties with Spain.
Article IV. New promise: Pirates shall not be allowed at all here in Sulu. Should
they commit any crime they shall be punished wherever they may be.
Article V. The subordinate rulers, and all boats, from this day on, shall use the
Spanish flag, but the Sultan and the Datus can use a war flag like the Spanish
officials. They will not use any other flag.
Article VI. The Island of Sulu and all its dependencies large and small, being the
same as the Philippine Islands in that they belong to Spain, all Spanish officers
and all ships flying the Spanish flag may navigate through the Sulu Archipelago
without any objection.
Article VII. It is recognized by the Sultan and the Datus that the King of Spain is
powerful these days and is just and merciful in acquiring “Kunkista,” and that it is
not right to build forts without informing the Spanish Government nor to buy
arms without having also informed the Spanish Government, nor to have boats
carry any arms except the kris and the spear, for other arms are signs of enmity.
Article VIII. The Spanish Government, wishing to promote fellowship with the
people of Sulu, gives the sultan and the datus titulu (titles) to increase their
respect and honor.
Article IX. The Spanish Government assures the Sultan and all the people that it
will let their religion alone, and that it will not try to change their religion, nor
object to the free exercise of their worship and the customs of their race.
Article X. The Spanish Government does also promise the people and the Sultan
that it will not break its word. It also promises to recognize the ranks of the Sultan
and the Datus, and also those of subordinate rulers and the people.
Article XI. Sulu boats and goods may go to Spanish countries without any
objection, in the same manner as if they belonged to that country.
Article XII. All ships that come to Sulu, except those of Spain, pay duties as
previously, in order that the Sultan and the Datus may get a share of the income of
their towns, and may adopt measures which will improve and benefit the town.
Article XIII. If the power of the Sultan is well established and sustained, he may
be able to secure other profits besides this, by helping the Spanish Government, in
accordance with Article 3 of the treaty of 1836, providing for the building of a
trading post which would be guarded by Spain. It will be proper for the Sultan
and the Datus to help in the erection of this trading post, and all labor and lumber
shall be paid for according to the custom of the place.
Article XIV. This trading post shall be built near the site of the fort of Amil
Bahar.6 It shall not encroach upon nor cause any injury to the cemetery of the
Mohammedans, but out of due respect to their religion no house shall be erected
there, and in case any be erected it shall be destroyed.
Article XV. The Sultan of Sulu has the right to give passports to all of his people
who request it, sign those which he issues, and countersign Spanish passports
coming to Sulu.
Article XVI. The Spanish Government, forgiving the previous offenses of the
Sultan, and in consideration of the destruction by fire of his palace and his fort,
grants the Sultan a yearly sum of ₱1,500 as a help and an indemnity for his losses.
The Spanish Government also grants to each of the Datus Mohammed Buyuk,
Muluk, and Amil Bahar, ₱600 a year, and to Tuan Sharif Mohammed Binsarin
₱360 on account of his good services to Spain.
Article XVII. The articles of this treaty shall take effect to-day. They shall be
shown to the Captain-General of the Philippine Islands lest he would not agree to
them. They are also in Spanish.
This treaty gained its purpose in that it checkmated the agreement of Sir
James Brooke, but it certainly did not receive as much consideration at Jolo
and Zamboanga as it did at Madrid and London. Its effect was temporary
only. As early as 1854 a town on Kapul was burned by the Spanish forces
from Basilan. In 1855 the Sulus made a dash upon Zamboanga and burned
the best part of the town. The “Light Fleet” issued from Isabela de Basilan
in 1857, surprised Simisa, rescued 76 captives, and took 116 prisoners. The
chiefs against whom the expedition was directed presented themselves later
to the governor of Zamboanga and exchanged the Moro prisoners for 60
Christian captives, 1 priest, and 1 European woman. Many pirates
continued to scour the remote parts of the Archipelago. In 1858 Governor-
General Norzagaray published a proclamation calling the attention of chiefs
of provinces and municipalities to the approach of the season at which the
pirates appear, and invoking their aid to caution the people and to take
proper measures for the defense of their towns. Rewards were also offered
for catching or killing pirates and for seizing their boats wherever found,
but this had no important effect. In 1860 about 400 Moros raided the Straits
of San Bernardino and plundered several settlements.
The year 1861 marks a new era in the history of piracy and a new step in
the organization of government for Mindanao and Basilan. At this time
Spain and the Philippines were passing through a period of progress. Alive
to the truth that commerce and piracy can not coexist, the government
provided a competent naval force by which it was able to maintain
unquestionable supremacy in the Sulu Sea. It purchased eighteen steam
vessels in England and used them for chasing Moro pirates and for
blockading the port of Jolo. The operations conducted by these vessels
drove away hordes of pirates from Philippine waters, and, in the course of a
decade, terminated that long term of piracy under which the Islands had
suffered for three centuries.
CIRCULAR
Your Excellency: The Queen (whom God protect) has been pleased to issue the
following Royal decree: Pursuant to the reasons laid before me by the Minister of
War and Colonies, and in accordance with the opinion of the Council of
Ministers, I hereby decree the following:
Article I. A politico-military Government is hereby established for the island of
Mindanao and adjacent islands.
Article II. The Government of Mindanao shall be divided into six districts: 1. the
Zamboanga District, formed of that part of the province of the same name which
includes all of Sibugay Bay, and the west coast of the island as far as Murciélagos
Point; 2. the District of the North, including, in the northern part of the island, all
the territory between the boundary line of the 1st District and Dapitan Point, on
Tutwan Bay; 3. the Eastern District, between Dapitan Point, and Karaga Bay; 4.
the Davao District, beginning on the boundary line of the 3d District and
including the Bay of Davao and all the southern extremity of the island; 5. the
Central District, including Illana Bay, situated between the 1st and 4th districts; 6.
the District of Basilan, comprising the Spanish possessions in the Archipelagoes
of Sulu and Basilan. The capital of the Government shall be in the Central
District, the most advantageous place at the mouth of the Mindanao River being
chosen. These districts shall be divided into two classes; to the first class shall
belong the Northern, Central and Eastern districts, and to the second those of
Zamboanga, Davao and Basilan.
Article III. The Governor of Mindanao shall receive 6,000 pesos as salary, and
2,000 pesos as entertainment fund. The latter shall be supplied from the revenues
from Government real estate and licenses. The Governor’s residence shall also be
supplied by the State.
Article IV. This Governorship shall correspond to the class of brigadier generals;
but the first Governor appointed may be a colonel, who will be entitled, as a
reward, to an appointment as brigadier general after three years.
Article VI. The duties and powers of the Captain General in regard to the
Government of Mindanao, and those of the Governor of the island, shall be the
same as those provided for the Bisayas in my Royal decree of this date. As
military authorities, they shall observe the usual relations between Captains
General and Commanders General of Provinces. The Governor of Mindanao shall
forward each month to the Captain General of the Philippines a tabulated record
of the resolutions taken by him in the exercise of his authority, so that the latter
may be able to exercise with efficiency the general supervision to which he is
entitled. The Captain General shall forward to the Supreme Government, through
the proper channels, both this tabulated record, and a statement of the action he
has taken in the premises.
Article VII. The districts of the first class shall be governed by lieutenant-
colonels and those of the second class by senior majors.
Article VIII. The duties of these district governors shall be those specified, up to
the present time, for the politico-military Governors of the island.
Article IX. The Governor of Mindanao shall have a Secretariate with the
following personnel: a Secretary at 2,500 pesos per year; one clerk, class one, at
1,200; one clerk, class two, at 1,000, and one clerk, class three, at 800. 1,000
pesos are furthermore provided for the salaries of copyists, and 500 for office
supplies.
Article X. There is hereby created for Mindanao a Revenue Office which shall
serve as depositary of the revenues, and shall have charge of collecting all taxes,
and of the administration of the Army. It shall have the following personnel: an
Administrator at 2,500 pesos; a Controller at 2,000; one clerk, class one, at 1,000;
two clerks, class two, at 800, and a cashier at 800. 1,500 pesos are provided for
the salaries of copyists and other auxiliary employees, and 600 for office supplies.
Article XI. The chiefs of districts shall remain in charge of the collection of
taxes in the manner hitherto established, and shall be entitled to the allowances
provided for that purpose. The provisions of this article shall not interfere with
those already made for the departments of the administration which exist at the
present time in Mindanao and their dependencies.
Article XII. For expediting their official business the district governors shall
have a secretary at a salary of 800 pesos in districts of the first class, and 600 in
those of the second class. To each secretary’s office 75 pesos are assigned for
office supplies, and 150 for a copyist.
Article XIII. The mission of the Jesuits, which has already been sent to
Mindanao, shall look after the spiritual wants of the island, and Jesuits shall take
the place of the other priests as soon as the mission has a sufficient personnel, and
in the manner which may be deemed most convenient.
Article XIV. The first and principal object of the mission shall be to secure the
conversion of the races which have not yet been subjected, and even after the
parishes of the island are provided for it shall maintain a sufficient number of
missionaries for that purpose; each missionary shall be aided to the extent of 800
pesos a year from the Royal Treasury.
Article XV. The War and Navy Departments, together with the Colonial Office,
shall decide what forces of the army and navy are required for Mindanao; the
Captain-General shall have authority to make such changes as the circumstances
may require, but he shall always report such changes to the respective Ministers
for approval.
Article XVI. The Governor can use the naval forces whenever he finds it
necessary, with the assent of the commanding officer thereof.
Article XVII. It shall be the constant duty of the army to explore and to occupy
the country; for that purpose, two columns at least shall be detached each year
from each district, and go through said districts in different directions. The chiefs
of these columns shall make out a report about the territory reconnoitered by
them; said reports shall be included in a general report made by the Governor,
which shall be forwarded to the Department of War and Colonies through the
Captain-General of the Philippines; this information will allow the Governor to
give, in the following years his instructions to the columns sent out to explore the
country, without losing sight of the advantage of establishing friendly relations
with the tribes which inhabit the island, and the necessity of maintaining
communication between the different districts. These columns shall be provided
with everything that may be required to overcome the obstacles they will find on
their way; and during the expedition, officers and soldiers shall receive field
rations, issued in kind, according to the advice of the Military Health Department.
For this purpose 10,000 pesos shall be carried on the budget for the first year, and
100 pesos shall be given for each expedition to the officer commanding a column,
for extraordinary expenses.
Article XVIII. Two special agents shall be appointed by the government for the
purpose of studying means of developing all the natural resources of the island of
Mindanao.
Article XIX. In order to encourage colonists to settle in such parts of the island
as may be deemed best, they will be furnished, at their request, the tools and
implements required for their work or trade. The Governor is furthermore
authorized to pay the traveling expenses of colonists who may wish to settle in the
island without exceeding the sum hereinafter provided, the expenditure of which
shall be duly accounted for. The new settlers shall be entitled to the foregoing
privileges for ten years, and 12,000 pesos shall be appropriated for that purpose
during the first year, from the revenues accruing from government real estate and
licenses. The new settlers shall be exempt from tribute; the same favor shall be
granted all tribes that submit peacefully.
Article XX. The laws and regulations in force in the other islands of the
Philippines shall be observed in all the offices of the Treasury Department. The
prohibitions mentioned in the tariff shall apply to the custom house of
Zamboanga; articles imported into the island in Spanish bottoms, and for local
consumption, shall pay, during the next ten years, 2 per cent ad valorem, if of
Spanish origin and 5 per cent if of foreign origin. If brought under a foreign flag
said articles shall pay double the amounts specified above. If, after importing an
article for use in the island, it is reëxported to some other Spanish island, it shall
pay, on arrival at the latter the difference between what has been paid in
Mindanao and the regular duty established in the tariff.
Article XXI. Lands now under cultivation, and those placed under cultivation
during the next ten years, shall pay no other impost than that required by the
regulations now in force, per quiñon of land, as an acknowledgment of
ownership.7
Article XXII. The Government shall always have on hand a reserve fund of
10,000 pesos to meet any urgent and unexpected need that may arise; in such
cases only, the Governor shall assume the responsibility of using this sum, or part
of the same, and shall account for the expenditure, in the usual manner.
Article XXIII. A sum of 3,000 pesos per year is placed at the disposal of the
Governor for presents to the independent tribes, for the purpose of gaining their
friendship; the same amount is assigned to the mission of the Jesuits. These funds
shall be expended and accounted for in the best possible form.
Article XXIV. For the expenses of installation a special estimate shall be drawn
up, and action shall be taken thereon as provided by the laws for urgent cases.
Article XXV. No extra pay or allowances of any kind shall be given except such
as are provided in the present decree, and the per diems usually granted military
engineers when they are sent out on official business.
Article XXVI. The War, Navy, and Colonies Departments shall execute the
present Decree in the parts which respectively concern them, and shall work in
common for the execution of such parts thereof as may belong to two or more
Departments.
Article XXVII. So many of the laws and orders in force as are inconsistent with
the provisions of the present decree are hereby repealed.
The succession of Jamalul Aʿlam was contested by Datu Jamalul Kiram, the
grandson of Sultan Shakirul Lah. The wife of Datu Jamalul Kiram was the
daughter of Datu Daniel Amil Bahar, and the latter was inclined to support
his son-in-law. Jamalul Aʿlam, however, had the majority of the council of
the datus on his side, and a Spanish commission sent to Jolo in November,
confirmed his sultanate. Espina states that at that time the sultan was living
with Datu Asibi, and that the portrait of Queen Isabel II was placed before
the sultan when he made his declaration before the commission to recognize
the authority and sovereignty of Spain over all the dominions of Sulu,
including her dependencies in Borneo.
Another note in the Sulu Annals, under date of March 5, 1872, states that 13
Spanish vessels attacked Jolo, killed 3 men and 1 woman and lost 2 officers
and 100 soldiers. That same year the famous warrior Datu Daniel Amil
Bahar died; and Puerta Princesa, capital of Palawan, was garrisoned by
native troops. A naval blockade of Jolo was established and hostilities
between Sulu and Spain were resumed. In 1873–1875 considerable damage
was done by the fleet throughout the Archipelago, and two German vessels
were seized while carrying contraband of war to the Sulus.
In the estimation of the Sulus, Jamalul A’lam was one of their best rulers.
He carried out many public improvements, built roads and bridges and
mosques, enforced public attendance at the Friday church services, and
executed the laws with justice and force. He was as able a ruler as any
sultan Sulu had since the days of Abu Bakr, but the vicissitudes of fortune
were certainty against him. Before his reign ended, Spain’s hand fell upon
him strong and heavy, his capital was wrested from him, and his power
waned.
Occupation of Jolo
The Sulu sultanate remained practically independent for four hundred and
twenty-five years. Its decline was not caused by national retrogression or
political dissension, but by the hostility and aggression of its adversary.
Sulu’s power arose through the introduction of firearms into eastern
Malaysia and began to decline at the introduction of steam war vessels into
the Philippine Archipelago. The mobility and speed of steam war vessels
put to disadvantage all Moro sailing and rowing craft. Pirates were chased
on the sea and hunted in their lairs. The fear which steamboats struck in the
hearts of Moros made them run away from their homes and settlements and
hide in the jungles whenever they heard the whistle of a steamboat, or saw
it approaching from a distance. The steamboats purchased by Governor
Claveria in 1848, which crushed the power of the Balangingi Samals, were
referred to by Captain Keppel in the following words:
“On the 14th of January [1849] we left Zamboanga, getting under weigh in
company with such a fleet of gunboats as would have done credit to any nation.”
The vessels purchased in 1861 increased the efficiency of the navy to such a
degree as to make it possible to carry war into Sulu territory, attack many
remote islands and settlements and blockade the port of Jolo so effectively
as to check the importation of firearms and ammunition, and restore a
condition of safety and peace on the sea.
The campaign of 1876 was a very significant event in the history of Sulu. It
decided the fate of this state and definitely fixed its relation to the
Philippine Archipelago. Spain’s determination to conquer Sulu never waned
and seemed stronger then than ever before. The Governor-General was a
man of great ability and aspired to the highest military honors. Moro raids
recurred occasionally and the strained relations of the two states became so
tense that rupture was inevitable.
Since the days of the great Corcuera, no Spanish general appears to have
recognized the importance of the occupation of Sulu as an essential factor
in its pacification. Their apparent inability to comprehend the real solution
of this question might have arisen from consciousness of their inability to
provide an adequate force for the purpose. However that may have been,
the honor of such an achievement remained for Governor-General
Malcampo, who carried it out with credit to himself and to the government
which he represented. With a clear understanding of the task to be
accomplished, he resolved to conquer Sulu and occupy it, and then suppress
piracy by striking the pirates at home. He left Manila on the 5th of
February, 1876, with a large force composed of one battalion of the
peninsular regiment of artillery, one company of mountain artillery, five
regiments of infantry, ordnance, engineers, sanitary and prison detachments,
and two companies of the Guardia Civil.1 At Zamboanga, the expedition
was reinforced by 864 volunteers, 400 of whom were from Zamboanga and
464 from Kagayan de Misamis commanded by the Augustinian friar,
Ramon Zueco.
The whole expedition, estimated at 9,000 troops, left Zamboanga on the
20th of February. They were conveyed in 10 steamboats and 11 transports,
and were escorted by a fleet of 12 gunboats under the admiral in command
of the Philippine naval forces. The Island of Sulu was reached on the 21st,
and next morning a force disembarked at Patikul, 4 miles east of Jolo. The
Moros at this place offered some resistance and caused some casualties, but
later in the day abandoned the place and fled. Here a considerable column
was detached to reconnoitre the interior and advance on Jolo from the land
side. This plan proved impracticable and the column suffered severely from
heat and thirst and returned next day to the beach at Tandu, 2 miles east of
Jolo. On the 29th, a general advance was made on Jolo by land and sea. The
fleet opened fire on the town, while the land forces rushed the forts and
trenches on the sides. The main force was directed against the fort of
Daniel, which was captured after a sharp fight. The Moros in the other forts
made a fiercer resistance, but were soon overcome by the fire of the
Spanish artillery and the whole town was taken by assault. On the 30th, the
fort of Panglima Adak, situated at the base of the hills, was taken. Not
content with this brilliant victory and intent upon striking a decisive and
deadly blow, Malcampo directed various expeditions against the other
strongholds of Sulu. A force of marines and volunteers destroyed 80 boats
and burned 90 houses on Tapul. On March 16 an expedition to Lapak
destroyed its forts and reduced the settlement to ashes. On March 22 the
forts of Parang were reduced, the settlement was burned, and many Sulus
killed. On the 24th Maymbung was similarly destroyed.
The step thus taken by the Philippine Government appears to have been
well planned and firmly resolved. No sooner was a footing gained than
measures were undertaken to quarter the troops and fortify the place.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com