100% found this document useful (6 votes)
120 views47 pages

Download full MATLAB Programming for Engineers 5th Edition Chapman Solutions Manual all chapters

The document provides links to download various MATLAB solutions manuals, including the 'MATLAB Programming for Engineers 5th Edition Chapman Solutions Manual.' It also includes code snippets for generating random numbers and calculating hyperbolic functions in MATLAB. Additionally, it outlines the structure and usage of specific functions within MATLAB programming.

Uploaded by

bajangmangur
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 (6 votes)
120 views47 pages

Download full MATLAB Programming for Engineers 5th Edition Chapman Solutions Manual all chapters

The document provides links to download various MATLAB solutions manuals, including the 'MATLAB Programming for Engineers 5th Edition Chapman Solutions Manual.' It also includes code snippets for generating random numbers and calculating hyperbolic functions in MATLAB. Additionally, it outlines the structure and usage of specific functions within MATLAB programming.

Uploaded by

bajangmangur
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/ 47

Visit https://testbankfan.

com to download the full version and


explore more testbank or solutions manual

MATLAB Programming for Engineers 5th Edition


Chapman Solutions Manual

_____ Click the link below to download _____


https://testbankfan.com/product/matlab-programming-for-
engineers-5th-edition-chapman-solutions-manual/

Explore and download more testbank or solutions manual at testbankfan.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

MATLAB Programming with Applications for Engineers 1st


Edition Chapman Solutions Manual

https://testbankfan.com/product/matlab-programming-with-applications-
for-engineers-1st-edition-chapman-solutions-manual/

Essentials of MATLAB Programming 3rd Edition Chapman


Solutions Manual

https://testbankfan.com/product/essentials-of-matlab-programming-3rd-
edition-chapman-solutions-manual/

MATLAB for Engineers 5th Edition Moore Solutions Manual

https://testbankfan.com/product/matlab-for-engineers-5th-edition-
moore-solutions-manual/

Introduction to MATLAB Programming and Numerical Methods


for Engineers 1st Edition Siauw Solutions Manual

https://testbankfan.com/product/introduction-to-matlab-programming-
and-numerical-methods-for-engineers-1st-edition-siauw-solutions-
manual/
MATLAB for Engineers 4th Edition Moore Solutions Manual

https://testbankfan.com/product/matlab-for-engineers-4th-edition-
moore-solutions-manual/

Engineers Guide To MATLAB 3rd Edition Magrab Solutions


Manual

https://testbankfan.com/product/engineers-guide-to-matlab-3rd-edition-
magrab-solutions-manual/

MATLAB A Practical Introduction to Programming and Problem


Solving 5th Edition Attaway Solutions Manual

https://testbankfan.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-5th-edition-attaway-solutions-manual/

Applied Numerical Methods with MATLAB for Engineers and


Scientists 2nd Edition Steven Chapra Solutions Manual

https://testbankfan.com/product/applied-numerical-methods-with-matlab-
for-engineers-and-scientists-2nd-edition-steven-chapra-solutions-
manual/

Design Concepts for Engineers 5th Edition Horenstein


Solutions Manual

https://testbankfan.com/product/design-concepts-for-engineers-5th-
edition-horenstein-solutions-manual/
7. Advanced Features of User-Defined Functions
7.1 Function random1 produces samples from a uniform random distribution on the range [-1,1). Note that
function random0 is a local function (or subfunction) of this function, since it appears in the same file
below the definition of random1. Function random0 is only accessible from function random1, not
from external functions. This is different from the behavior of the function random0 included with the
function random1 written in Exercise 6.29.

function ran = random1(n,m)


%RANDOM1 Generate uniform random numbers in [1,1)
% Function RANDOM1 generates an array of uniform
% random numbers in the range [1,1). The usage
% is:
%
% random1() -- Generate a single value
% random1(n) -- Generate an n x n array
% random1(n,m) -- Generate an n x m array

% Define variables:
% m -- Number of columns
% n -- Number of rows
% ran -- Output array

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(1,2,nargin);
error(msg);

% If both arguments are missing, set to 1.


% If the m argument is missing, set it to n.
if nargin < 1
m = 1;
n = 1;
elseif nargin < 2
m = n;
end

% Initialize the output array


ran = 2 * random0(n,m) - 1;

function ran = random0(n,m)


%RANDOM0 Generate uniform random numbers in [0,1)
% Function RANDOM0 generates an array of uniform
% random numbers in the range [0,1). The usage
% is:
%
% random0(n) -- Generate an n x n array
% random0(n,m) -- Generate an n x m array

185
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Define variables:
% ii -- Index variable
% ISEED -- Random number seed (global)
% jj -- Index variable
% m -- Number of columns
% msg -- Error message
% n -- Number of rows
% ran -- Output array
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 02/04/14 S. J. Chapman Original code
% 1. 04/05/15 S. J. Chapman Modified for 0 arguments

% Declare global values


global ISEED % Seed for random number generator

% Check for a legal number of input arguments.


msg = nargchk(0,2,nargin);
error(msg);

% If both arguments are missing, set to 1.


% If the m argument is missing, set it to n.
if nargin < 1
m = 1;
n = 1;
elseif nargin < 2
m = n;
end

% Initialize the output array


ran = zeros(n,m);

% Test for missing seed, and supply a default if necessary.


if isempty(ISEED)
ISEED = 99999;
end

% Now calculate random values


for ii = 1:n
for jj = 1:m
ISEED = mod(8121*ISEED + 28411, 134456 );
ran(ii,jj) = ISEED / 134456;
end
end

186
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
7.2 Function randomn produces samples from a uniform random distribution on the range [low,high). If
low and high are not supplied, they default to 0 and 1 respectively. Note that function random0 is
placed in a folder named private below the folder containing randomn. Function random0 is only
accessible from function in the parent directory, not from other functions. A listing of the directory is
shown below:

C:\Data\book\matlab\5e\soln\Ex7.2>dir /s
Volume in drive C is SYSTEM
Volume Serial Number is 9084-C7B1

Directory of C:\Data\book\matlab\5e\soln\Ex7.2

02/05/2015 01:16 PM <DIR> .


02/05/2015 01:16 PM <DIR> ..
02/05/2015 01:16 PM <DIR> private
25/09/2011 11:36 AM 1,297 randomn.m
1 File(s) 1,297 bytes

Directory of C:\Data\book\matlab\5e\soln\Ex7.2\private

02/05/2015 01:16 PM <DIR> .


02/05/2015 01:16 PM <DIR> ..
19/05/2015 06:01 PM 1,473 random0.m
1 File(s) 1,473 bytes

Total Files Listed:


2 File(s) 2,770 bytes
5 Dir(s) 79,965,483,008 bytes free

C:\Data\book\matlab\5e\soln\Ex7.2>

Function randomn is shown below:

function ran = randomn(n,m,low,high)


%RANDOMN Generate uniform random numbers in [low,high)
% Function RANDOM1 generates an array of uniform
% random numbers in the range [low,high), where low
% and high are optional parameters supplied by the user.
% If not supplied, low and high default to 0 and 1,
% respectively. The usage is:
%
% random1(n) -- Generate an n x n array
% random1(n,m) -- Generate an n x m array

% Define variables:
% high -- Upper end of range
% low -- Lower end of range
% m -- Number of columns
% n -- Number of rows
% ran -- Output array

% Record of revisions:
% Date Programmer Description of change
187
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(1,4,nargin);
error(msg);

% If arguments are missing, supply the default values.


if nargin < 2
m = n;
low = 0;
high = 1;
elseif nargin < 3
low = 0;
high = 1;
elseif nargin < 4
high = 1;
end

% Check that low < high


if low >= high
error('Lower limit must be less than upper limit!');
end

% Initialize the output array


ran = (high - low) * random0(n,m) + low;

The following function appears in a directory name private below the directory containing function
randomn:

function ran = random0(n,m)


%RANDOM0 Generate uniform random numbers in [0,1)
% Function RANDOM0 generates an array of uniform
% random numbers in the range [0,1). The usage
% is:
%
% random0(n) -- Generate an n x n array
% random0(n,m) -- Generate an n x m array

% Define variables:
% ii -- Index variable
% ISEED -- Random number seed (global)
% jj -- Index variable
% m -- Number of columns
% msg -- Error message
% n -- Number of rows
% ran -- Output array
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 02/04/14 S. J. Chapman Original code
% 1. 04/05/15 S. J. Chapman Modified for 0 arguments
188
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Declare global values
global ISEED % Seed for random number generator

% Check for a legal number of input arguments.


msg = nargchk(0,2,nargin);
error(msg);

% If both arguments are missing, set to 1.


% If the m argument is missing, set it to n.
if nargin < 1
m = 1;
n = 1;
elseif nargin < 2
m = n;
end

% Initialize the output array


ran = zeros(n,m);

% Test for missing seed, and supply a default if necessary.


if isempty(ISEED)
ISEED = 99999;
end

% Now calculate random values


for ii = 1:n
for jj = 1:m
ISEED = mod(8121*ISEED + 28411, 134456 );
ran(ii,jj) = ISEED / 134456;
end
end

When this function is used to generate a 4 x 4 array of random numbers between 3 and 4 the results are: :

>> randomn(4,4,3,4)
ans =
3.7858 3.0238 3.4879 3.5630
3.5319 3.0040 3.3435 3.0988
3.4300 3.5385 3.0946 3.6670
3.1507 3.1958 3.6362 3.9179

7.3 A single function hyperbolic that calculates the hyperbolic sine, cosine, and tangent functions is shown
below. Note that sinh, cosh, and tanh are subfunctions here.

function result = hyperbolic(fun,x)


% HYPERBOLIC Calculate the hyperbolic sine of x
% Function HYPERBOLIC calculates the value of a hyperbolic
% sin, cos, or tan, depending on its its input parameter.

% Define variables:
% fun -- Function to evaluate
189
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% x -- Input value
% result -- Result of calculation

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(2,2,nargin);
error(msg);

% Calculate function
switch (fun)
case 'sinh',
result = sinh(x);
case 'cosh',
result = cosh(x);
case 'tanh',
result = tanh(x);
otherwise,
msg = ['Invalid input function: ' fun];
error(msg);
end

function result = sinh1(x)


%SINH1 Calculate the hyperbolic sine of x
% Function SINH1 calculates the hyperbolic sine of
% its input parameter.

% Define variables:
% x -- input value
% result -- Result of calculation

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(1,1,nargin);
error(msg);

% Calculate value.
result = (exp(x) - exp(-x)) / 2;

function result = cosh1(x)


%COSH1 Calculate the hyperbolic cosine of x
% Function COSH1 calculates the hyperbolic cosine of
% its input parameter.

190
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Define variables:
% x -- input value
% result -- Result of calculation

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(1,1,nargin);
error(msg);

% Calculate value.
result = (exp(x) + exp(-x)) / 2;

function result = tanh1(x)


%COSH1 Calculate the hyperbolic tangent of x
% Function TANH1 calculates the hyperbolic tangent
% of its input parameter.

% Define variables:
% x -- input value
% result -- Result of calculation

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(1,1,nargin);
error(msg);

% Calculate value. Note that we are using the


% array division "./" so that we get the correct
% answer in case an arry input argument is passed
% to this function.
result = (exp(x) - exp(-x)) ./ (exp(x) + exp(-x));

7.4 A program to create the three specified anonymous functions, and then to plot h ( f ( x ) , g ( x) ) over the
range −10 ≤ x ≤ 10 is shown below:
% Script file: test_anonymous.m
%
% Purpose:
% To create three anonymous functions, and then create a
% plot using them.
%
191
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code
%
% Define variables:
% f -- Function handle
% g -- Function handle
% h -- Function handle
% x -- Input data samples

% Create anonymous functions


f = @ (x) 10 * cos(x);
g = @ (x) 5 * sin(x);
h = @ (a,b) sqrt(a.^2 + b.^2);

% Plot the functiion h(f(x),g(x))


x = -10:0.1:10;
plot(x,h(f(x),g(x)));

When this program is executed, the results are:

7.5 The commands to plot the function f ( x) = 1/ x over the range 0.1 ≤ x ≤ 10.0 using function fplot
are shown below:

fplot(@(x) 1/sqrt(x), [0.1 10]);


title('Plot of f(x) = 1 / sqrt(x)');

192
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
xlabel('\bfx');
ylabel('\bff(x)');
grid on;

When these commands are executed, the results are:

7.6 A script file to find the minimum of the function y ( x ) = x 4 − 3 x 2 + 2 x over the interval [0.5 1.5] using
function fminbnd is shown below:

% Script file: test_fminbnd.m


%
% Purpose:
% To test function fminbnd using an anonymous function
% as an input fucntion.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code
%
% Define variables:
% minloc -- Location of minimum
% minval -- Value at minimum
% y -- Function handle
% x -- Input data samples

% Create anonymous function


y = @ (x) x.^4 - 3*x.^2 + 2*x;

193
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Find the minimum of the function in the range
% 0.5 <= x <= 1.5.
[minloc,minval] = fminbnd(y,0.5,1.5);
disp(['The minimum is at location ' num2str(minloc)]);

% Plot the function


z = linspace(-4,4,100);
plot(z,y(z));
grid on;
xlabel('\bfx');
ylabel('\bfy');
grid on;

When this program is executed, the results are:

>> test_fminbnd
The minimum is at location 0.99999

7.7 A script file to find the minimum of the function y ( x ) = x 4 − 3 x 2 + 2 x over the interval [0.5 1.5] using
function fminbnd is shown below:

% Script file: test_fminbnd.m


%
% Purpose:
% To test function fminbnd using an anonymous function
% as an input fucntion.
%
% Record of revisions:
194
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code
%
% Define variables:
% minloc -- Location of minimum
% minval -- Value at minimum
% y -- Function handle
% x -- Input data samples

% Create anonymous function


y = @ (x) x.^4 - 3*x.^2 + 2*x;

% Find the minimum of the function in the range


% -2 < x < 2.
[minloc,minval] = fminbnd(y,-2.0,2.0);
disp(['The minimum in the range (-2,2) is at location
' num2str(minloc)]);

% Find the minimum of the function in the range


% -1.5 < x < 0.5.
[minloc,minval] = fminbnd(y,-1.5,0.5);
disp(['The minimum in the range (-1.5,0.5) is at location
' num2str(minloc)]);

% Plot the function


z = linspace(-2.5,2.5,100);
plot(z,y(z));
grid on;
xlabel('\bfx');
ylabel('\bfy');
grid on;

When this program is executed, the results are:

>> test_fminbnd
The minimum in the range (-2,2) is at location -1.366
The minimum in the range (-1.5,0.5) is at location -1.366

195
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
7.8 A script file to create a histogram of samples from a random normal distribution is shown below:

% Script file: test_randn.m


%
% Purpose:
% To create a histogram of 100,000 samples from a random
% normal distribution.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code
%
% Define variables:
% dist -- Samples

% Get 100,000 values


dist = randn(1,100000);

% Create histogram
hist(dist,21);
title('\bfHistogram of random values');
xlabel('\bfValue');
ylabel('\bfCount');

196
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
When this program is executed, the results are:

>> test_randn

7.9 A Rose Plot is a circular histogram, where the angle data theta is divided into the specified number of
bins, and the count of values in each bin is accumulated. A script file to create a rose plot of samples from
a random normal distribution is shown below:

% Script file: test_rose.m


%
% Purpose:
% To create a rose plot of 100,000 samples from a random
% normal distribution.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/10/15 S. J. Chapman Original code
%
% Define variables:
% dist -- Samples

% Get 100,000 values


dist = randn(1,100000);

% Create histogram
rose(dist,21);
title('\bfRose Plot of random values');
197
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
xlabel('\bfValue');
ylabel('\bfCount');

When this program is executed, the results are:

>> test_rose

7.10 A function that finds the maximum and minimum values of a user-supplied function over a specified
interval is given below:

function [xmin,min_value,xmax,max_value] = ...


extremes(first_value,last_value,num_steps,func)
%EXTREMES Locate the extreme values of a function on an interval
% Function EXTREMES searches a user-supplied function over
% a user-suppled interval, and returns the minimum and maximum
% values found, as well as their locations.
%
% The calling sequence is:
% [xmin,min_value,xmax,max_value] = ...
% extremes(first_value,last_value,num_steps,func);
%
% where
% first_value = the start of the interval to search
% last_value = the end of the interval to search
% num_steps = the number of steps to use in search
% func = the function to evaluate
%
% The output values are:

198
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% xmin = location of smallest value found
% min_value = smallest value found
% xman = location of largest value found
% max_value = largest value found

% Define variables:
% dx -- Step size
% x -- Input values to evaluate fun at
% y -- Function output

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/12/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


msg = nargchk(4,4,nargin);
error(msg);

% Create array of values to evaluate the function at


dx = (last_value - first_value) / (num_steps - 1);
x = first_value:dx:last_value;

% Evaluate function
y = feval(func,x);

% Find maximum and minimum in y, and the locations in


% the array where they occurred.
[max_value, ymax] = max(y);
[min_value, ymin] = min(y);

% Get the x values at the locations of the maximum and


% minimum values.
xmax = x(ymax);
xmin = x(ymin);

7.11 A test program that tests function extremes is shown below:

% Script file: test_extremes.m


%
% Purpose:
% To test function extremes.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/12/15 S. J. Chapman Original code
%
% Define variables:
% max_value -- Maximum value
% min_value -- Minimum value
% xmax -- Location of maximum value
% xmin -- Location of minimum value
199
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Call extremes
[xmin,min_value,xmax,max_value] = extremes(-1,3,201,'fun');

% Display results
fprintf('The maximum value is %.4f at %.2f\n',max_value,xmax);
fprintf('The minimum value is %.4f at %.2f\n',min_value,xmin);

The test function to evaluate is

function y = fun(x)
%FUN Function to test extremes

% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 07/21/11 S. J. Chapman Original code

y = x.^3 - 5*x.^2 + 5*x +2;

When this program is run, the results are as shown below. The plot of the function below shows that the
program has correctly identified the extremes over the specified interval.

» test_extremes
The maximum value is 3.4163 at 0.62
The minimum value is -9.0000 at -1.00

200
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
7.12 The function fzero locates a zero in a function either near to a user-specified point or within a user-
specified range. If a range is used, then the sign of the function must be different at the beginning and end
of the range. This suggests a strategy for solving this problem—we will search along the function between
0 and 2 π at regular steps, and if the function changes sign between two steps, we will call fzero to
home in on the location of the root.

Note that we can determine whether the function has changed sign between two points by multiplying them
together and seeing the resulting sign. If the sign of the product is negative, then the sign must have
changed between those two points.

% Script file: find_zeros.m


%
% Purpose:
% To find the zeros of the function f(x) = (cos (x))^2 - 0.25
% between 0 and 2*PI.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/12/15 S. J. Chapman Original code
%
% Define variables:
% x -- Input values to examine
% y -- Value of the function at x
% zero_index -- Index into the zero array
% zero_loc -- Location of zeros

% Create function
hndl = @ (x) cos(x).^2 - 0.25;

% Evaluate the function at 50 points between 0 and 2*PI.


x = linspace(0,2*pi,50);
y = hndl(x);

% Check for a sign change


zero_loc = [];
zero_index = 0;
for ii = 1:length(x)-1
if y(ii)*y(ii+1) <= 0

% Find zeros
zero_index = zero_index + 1;
zero_loc(zero_index) = fzero(hndl,[x(ii) x(ii+1)]);

% Display results
disp(['There is a zero at at ' num2str(zero_loc(zero_index))]);

end
end

% Now plot the function to demonstrate that the zeros are correct
figure(1);
plot(x,y,'b-','LineWidth',2);
201
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
hold on;
plot(zero_loc,zeros(size(zero_loc)),'ro');
hold off;
title('\bfLocation of Function Zeros');
xlabel('\bfx');
ylabel('\bfy');
legend('Function','Zeros found by fzero');
grid on;

When this program is run, the results are as shown below. The plot of the function below shows that the
program has correctly identified the zeros over the specified interval.

>> find_zeros
There is a zero at at 1.0472
There is a zero at at 2.0944
There is a zero at at 4.1888
There is a zero at at 5.236

7.13 A program to evaluate and plot the function f ( x ) = tan 2 x + x − 2 between −2π and 2π in steps of
π /10 is shown below:
% Script file: eval_and_plot_fn.m
%
% Purpose:
% To find the zeros of the function f(x) = (cos (x))^2 - 0.25
% between 0 and 2*PI.
%
% Record of revisions:

202
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Date Programmer Description of change
% ==== ========== =====================
% 04/12/15 S. J. Chapman Original code
%
% Define variables:
% hndl -- Function handle
% x -- Input values to examine
% y -- Value of the function at x

% Create function handle


hndl = @ fun;

% Evaluate the function at 50 points between 0 and 2*PI.


x = linspace(0,2*pi,200);
y = feval(hndl,x);

% Now plot the function


figure(1);
plot(x,y,'b-','LineWidth',2);
title('\bfPlot of function');
xlabel('\bfx');
ylabel('\bfy');
grid on;

When this program is run, the results are as shown below. The plot is shown twice, once at full scale and
once with the maximum y axis value limited to 50, so that the details of the plot can be observed.

>> eval_and_plot_fn

203
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
7.14 A program to find potential targets in a radar’s range/Doppler space is shown below. This program finds
potential targets by looking for points that are higher than all of the neighboring points.

% Script file: find_radar_targets.m


%
% Purpose:
% This program detects potential targets in the range /
% velocity space.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/12/15 S. J. Chapman Original code
%
% Define variables:
% amp_levels -- Amplitude level of each bin
% noise_power -- Power level of peak noise
% nvals -- Number of samples in each bin

% Load the data


load rd_space.mat

% Calculate histogram
[nvals, amp_levels] = hist(amp(:), 31);

% Get location of peak

204
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Exploring the Variety of Random
Documents with Different Content
passengers on this trip. Halliman secured an axe to break it open,
when McClellan offered him the key. Reynolds refused the key,
venturing the opinion that they could soon get into it without the
key. Breaking it open they took out $6,000 worth of gold dust and
$2,000 worth of gold amalgam that John W. Smith was sending to
the East, it being the first taken from the Orphan Boy mine, as well
as the first run from the stamp mill erected in Mosquito gulch. Capt.
Reynolds then ordered Halliman to cut open the mail bags, passing
him his dirk for the purpose. They tore open the letters, taking what
money they contained, which was considerable, as nearly all the
letters contained ten and twenty-dollar bills, which the miners were
sending back to their friends in the East. The haul amounted to
$10,000 in all, a much smaller sum than the coach usually carried
out.
After having secured all the valuables, Capt. Reynolds ordered his
men to destroy the coach, saying that he wanted to damage the
United States government as much as possible. His men at once
went to work to chopping the spokes out of the wheels. They ate
the dinner prepared by Mrs. McLaughlin, and Capt. Reynolds then
announced his determination to go on to the Michigan ranch and
secure the stage stock which were kept there. Before leaving, he
said to McClellan and the other captives, that if they attempted to
follow the bandits they would be killed, and that the best thing they
could do would be to remain quietly at the ranch for a day or two,
adding that they were only the advance guard of 1,500 Texas
rangers who were raiding up the park, saying also that 2,500 more
Confederate troops were on their way north and had probably
reached Denver by that time.
CHAPTER II.
THE WHOLE COUNTRY AROUSED—
HUNDREDS OF ARMED MEN ON
THEIR TRAIL—REYNOLDS BECOMES
ALARMED AND BURIES A LARGE
PART OF THEIR PLUNDER—THE
PARTY ATTACKED IN CAMP—
SINGLETARY KILLED AND CAPT.
REYNOLDS WOUNDED—THE BAND
DISPERSED AND NEARLY ALL
CAPTURED—BROUGHT TO DENVER
AND SENTENCED FOR LIFE.
They then rode away, leaving the settlers dumbfounded by the
news. There had long been rumors of such a raid, and there being
neither telegraph nor railroad, they had no means of verifying the
reports. McClellan at once announced his determination to alarm the
mining camps of their danger, and although his friends endeavored
to dissuade him from his hazardous trip, he mounted a mule and
followed the robbers. He rode through Hamilton, Tarryall and
Fairplay, spreading the news and warning out citizens and miners,
arriving in due time at Buckskin. From there he sent runners to
California Gulch and other camps. McClellan himself stayed in the
saddle almost night and day for over a week, and in that time had
the whole country aroused. His energy and determined fearlessness
probably saved many lives and thousands of dollars worth of
property.
Active measures were now taken for the capture of the guerrillas.
Armed bodies of miners and ranchmen started on their trail. Col.
Chivington sent troops from Denver to guard coaches and to assist
in the capture. Gen. Cook, at that time chief of government
detectives for the department of Colorado, accompanied the troops,
and was soon on the trail of the marauders. The news that a band of
armed guerrillas was scouring the country was dispatched by courier
to Central City, and all the camps in that vicinity were notified. Even
south of the divide, at Pueblo and Cañon, companies were
organized, and it was but a question of a few days at least when the
band would be wiped out. Indeed, if there had been 4,000 of them
as Reynolds had reported, instead of a little band of nine, they
would have been gobbled up in short order.
Reaching the Michigan house the guerrillas took the stage horses
and robbed the men who kept the station. Going on they passed the
Kenosha house, stopping at various ranches and taking whatever
they wanted, and robbing everybody they met. Passing Parmelee’s
and Haight’s, they camped near the deserted St. Louis house, and at
daybreak moved on to the Omaha house for breakfast. Besides
refusing to pay for their meal, they robbed all the travelers camped
around the station except an Irishman hauling freight to Georgia
gulch. He gave them the pass word and grips of the Knights of the
Golden Circle, and was allowed to go on unmolested. While here
they found out that large bodies of citizens were in pursuit, and they
decided to move off the main road; so after leaving the Omaha
house they turned off and went up Deer creek to the range. Just
after they had gotten off the road into the timber a posse of twenty-
two mounted men passed up the road toward the Omaha house.
After awhile they saw another party evidently following their trail.
Capt. Reynolds took a spyglass, and finding that there were but
eighteen of them decided to fight. He strung his men out in single
file in order to make a plain trail, and after going about a mile,
doubled back and ambushed his men at the side of the trail.
Fortunately for the pursuing party, they turned back before they
were in gunshot of the guerrillas. Whether they scented danger, or
were tired of following what they thought was a cold trail, is not
known, but it was probably the latter, as the Reynolds gang was not
molested that day nor the next, although with the aid of his glass
Reynolds saw scouting parties scouring the mountains in every
direction. He saw that they were likely to be captured and resolved
to scatter the band in order to escape, hoping to be able to
rendezvous away down near the Greenhorn.
Capt. Reynolds decided that it would be prudent to conceal the
greater portion of their spoils until the excitement had died down
somewhat. Calling his brother, John, they passed up the little creek
that ran by their camp until they reached its head. Elk creek also
heads near there. They found a prospect hole which they thought
would answer their purpose. Capt. Reynolds took from his saddle-
bags $40,000 in currency and three cans full of gold dust, about
$63,000 in all, leaving one large can of gold dust and considerable
currency to be divided among the band before separating. They
wrapped the currency up in a piece of silk oil cloth and put it and the
cans back in the hole about the length of a man’s body. Returning to
the camp, Capt. Reynolds told his men that there were no pursuers
in sight, and announced his determination to disperse the band
temporarily, as he believed there was no chance of escape if they
remained together. He described the place of rendezvous mentioned,
and told them that it would be safe to move on down to a grove of
large trees on Geneva gulch, a short distance below, and camp for
dinner, as there was no one in sight. They went on down and
camped, and turned their horses loose to graze while dinner was
being gotten.
Larger Image

THE ATTACK ON THE ROBBERS’ CAMP.

Two of the men were getting dinner, and the others were gathered
around Capt. Reynolds, who was busily dividing the remaining
money and gold dust among them, when suddenly a dozen guns
cracked from behind some large rocks about 220 yards from the
outlaws’ camp. Owen Singletary fell dead, and Capt. Reynolds, who
was at that moment dipping gold dust from a can with a spoon, was
wounded in the arm. The outlaws at once broke for the brush, a few
even leaving their horses.
The attacking party, which consisted of twelve or fifteen men from
Gold Run under the leadership of Jack Sparks, had crawled around
the mountain unobserved until they reached the rocks, and then
fired a volley into the robber band. When the robbers took to the
brush, they went down to their camp and secured several horses,
the can of gold dust, the amalgam that was taken from the coach at
McLaughlin’s, Billy McClellan’s watch, and a lot of arms, etc. It was
coming on night, and after searching the gulches for a while in vain,
they cut off Singletary’s head, which they took to Fairplay as a
trophy of the fight. This was July 31, 1864.
The next day Halliman was captured at the Nineteen-mile ranch, and
they kept picking up the guerrillas one or two at a time until the
Thirty-nine-mile ranch was reached. John Reynolds and Jake Stowe,
who were traveling together, were pursued clear across the Arkansas
river, but they finally escaped, although Stowe was severely
wounded.
The remainder of the party were brought from Fairplay to Denver
under a heavy guard and placed in jail. They were given a sham
trial, and as it could not be proven that they had taken life they were
sentenced to imprisonment for life, although a great many of the
citizens thought they richly deserved hanging. While the party were
in jail in Denver, Gen. Cook had a long talk with Jim Reynolds, the
captain, and tried to find out from him what disposition had been
made of all the money and valuables the robbers were known to
have captured, knowing that they must have concealed it
somewhere, since they had but little when captured. Reynolds
refused to tell, saying that it was “safe enough,” and afterwards
adding they had “sent it home.”
CHAPTER III.
THEY ARE STARTED TO FORT LYON—
THEY UNDERSTAND THAT THEY
ARE TO BE KILLED—A
BLOODTHIRSTY SERGEANT AND A
BUNGLING EXECUTION—LEFT FOR
DEAD, JOHN ANDREWS ESCAPES—
THE GANG FINALLY WIPED OUT—
UNSUCCESSFUL SEARCH FOR THE
BURIED TREASURE.
About the first week in September the Third Colorado cavalry,
commanded by Col. Chivington, was ordered out against the
Indians. Capt. Cree, of Company A, was directed to take the six
prisoners from the county jail to Fort Lyon for “safe keeping,” and to
shoot every one of them if “they made any attempt to escape.” The
prisoners knew that they would be shot if the soldiers could find the
slightest pretext for so doing. The troop was composed of citizens of
Denver and vicinity, some of whom had suffered from the
depredations of the gang. One man they particularly feared was
Sergt. Abe Williamson, who, it will be remembered, drove the coach
which they robbed at McLaughlin’s. As they left the jail, Jim Reynolds
called out to Gen. Cook, who stood near watching the procession
start, “Good-bye, Dave; this is the end of us.” He did not know how
soon his prediction was to be fulfilled.
The first night out they camped eight miles from Denver, on Cherry
creek. The prisoners were given an opportunity to escape, but they
knew better than to try it. The next day the troops moved on to
Russelville, where they camped for the night. Again the prisoners
were given a chance to escape, but were afraid to try it.
The next morning they were turned over to a new guard, under
command of Sergt. Williamson. They were marched about five miles
from camp, and halted near an abandoned log cabin. Williamson
now told the prisoners that they were to be shot; that they had
violated not only the civil but the military law, and that he had
orders for their execution. Capt. Reynolds pleaded with him to spare
their lives, reminding him of the time when the robbers had him in
their power and left him unharmed. Williamson’s only reply was the
brutal retort that they “had better use what little time they still had
on earth to make their peace with their Maker.” They were then
blindfolded, the soldiers stepped back ten paces, and Sergt.
Williamson gave the order, “Make ready!” “Ready!” “Aim!” “Fire!” The
sight of six unarmed, blindfolded, manacled prisoners being stood up
in a row to be shot down like dogs unnerved the soldiers, and at the
command to fire they raised their pieces and fired over the
prisoners, so that but one man was killed, Capt. Reynolds, and he
was at the head of the line opposite Williamson. Williamson
remarked that they were “mighty poor shots,” and ordered them to
reload. Then several of the men flatly announced that they would
not be parties to any such cold-blooded murder, and threw down
their guns, while two or three fired over their heads again at the
second fire, but Williamson killed his second man. Seeing that he
had to do all the killing himself, Williamson began cursing the
cowardice of his men, and taking a gun from one of them, shot his
third man. At this juncture, one of his men spoke up and said he
would help Williamson finish the sickening job. Suiting the action to
the word, he raised his gun and fired, and the fourth man fell dead.
Then he weakened, and Williamson was obliged to finish the other
two with his revolver. The irons were then removed from the
prisoners, and their bodies were left on the prairie to be devoured by
the coyotes. Williamson and his men rejoined their command and
proceeded on to Fort Lyon, with Williamson evidently rejoicing in the
consciousness of duty well done.
Several hours afterward one of the prisoners, John Andrews,
recovered consciousness. Although shot through the breast, he
managed to crawl to the cabin and dress his wound as best he
could. He found a quantity of dried buffalo meat, left there by the
former occupants, upon which he managed to subsist for several
days, crawling to a spring near by for water. About a week later,
Andrews, who had recovered wonderfully, hailed a horseman who
was passing, and asked him to carry a note to a friend in the
suburbs of Denver. The stranger agreed to do this, and Andrews
eagerly awaited the coming of his friend, taking the precaution,
however, to secrete himself near the cabin for fear the stranger
might betray him. On the third day a covered wagon drove up to the
cabin, and he was delighted to hear the voice of his friend calling
him. His friend, who was J. N. Cochran, concealed him in the wagon,
and taking him home, secured medical attendance, and by careful
nursing soon had him restored to health and his wounds entirely
healed. While staying with Cochran, Andrews related to him the
history of the guerrilla band as it is given here, with the exception of
the story of the buried treasure, which neither he nor any of the
other members of the band, except Jim and John Reynolds, knew
anything about.
Larger Image

EXECUTION OF THE ROBBERS.

When he had fully recovered, Andrews decided to make an effort to


find John Reynolds and Stowe, who, he thought, had probably gone
south to Santa Fe. Cochran gave him a horse, and leaving Denver
under cover of darkness, he rode southward. Reaching Santa Fe, he
soon found Reynolds and Stowe, and the three survivors decided to
go up on the Cimarron, where they had cached a lot of silver and
other plunder taken from the Mexican wagon train on the way out
from Texas. Their horses giving out, they attacked a Mexican ranch
to get fresh ones. During the fight Stowe was killed, but Reynolds
and Andrews succeeded in getting a couple of fresh horses and
making their escape. They rode on to the Cimarron, and found the
stuff they had hidden, and then started back over the old trail for
Texas. The second day out, they were overtaken by a posse of
Mexicans from the ranch where they had stolen the horses, and
after a running fight of two or three miles, Andrews was killed.
Reynolds escaped down the dry bed of a small arroyo, and finally
succeeded in eluding his pursuers. Returning to Santa Fe, he
changed his name to Will Wallace, and lived there and in small
towns in that vicinity for several years, making a living as a gambler.
Tiring of the monotony of this kind of a life, Reynolds formed a
partnership with another desperado by the name of Albert Brown,
and again started out in the holdup business. They soon made that
country too hot to hold them, and in October, 1871, they started
toward Denver.
When near the Mexican town of Taos, they attempted to steal fresh
horses from a ranch one night, and Reynolds was mortally wounded
by two Mexicans, who were guarding the corral. Brown killed both of
them, and throwing Reynolds across his horse, carried him for
several miles. At length he found an abandoned dugout near a little
stream. Leaving his wounded comrade there, he set out to conceal
their horses after having made Reynolds as comfortable as possible.
He found a little valley where there was plenty of grass and water,
about two miles up the cañon. Leaving his horses there, he hastened
back to the dugout, where he found Reynolds in a dying condition,
and the conversation related in the first chapter of this story took
place.
Reynold’s Map. Star shows location of treasure.

Brown pushed on northward to Pueblo, intending to push his way


along the Arkansas on up into the park, but found that the snow was
already too deep. Returning to Pueblo, he pushed on to Denver. He
stayed there all winter, selling his horses and living upon the
proceeds. When spring came he was broke, but had by chance made
the acquaintance of J. N. Cochran, who had befriended John
Andrews, one of the gang, years before. Finding that Cochran
already knew a great deal about the gang, and needing some one
who had money enough to prosecute the search, he decided to take
Cochran into his confidence. Cochran was an old ’58 pioneer, and
had been all over the region where the treasure was hidden, and
knowing that Brown, who had never been in Colorado before, could
not possibly have made so accurate a map of the locality himself,
agreed to fit out an outfit to search for the treasure. They took the
map drawn by Reynolds while dying, and followed the directions
very carefully, going into the park by the stage road over Kenosha
hill, then following the road down the South Platte to Geneva gulch,
a small stream flowing into the Platte. Pursuing their way up the
gulch, they were surprised at the absence of timber, except young
groves of “quaking asp,” which had apparently grown up within a
few years. They soon found that a terrible forest fire had swept over
the entire region only a short time after the outlaws were captured,
destroying all landmarks so far as timber was concerned.
They searched for several days, finding an old white hat, supposed
to be Singletary’s, near where they supposed the battle to have
taken place, and above there some distance a swamp, in which the
bones of a horse were found, but they could not find any signs of a
cave. Running out of provisions they returned to Denver, and after
outfitting once more returned to the search, this time going in by
way of Hepburn’s ranch. They found the skeleton of a man, minus
the head (which is preserved in a jar of alcohol at Fairplay),
supposed to be the remains of Owen Singletary. They searched
carefully over all the territory shown on the map, but failed to find
the treasure cave. Cochran finally gave up the search, and he and
Brown returned again to Denver.
Brown afterward induced two other men to go with him on a third
expedition, which proved as fruitless as the other two trips. On their
return, Brown and his companions, one of whom was named Bevens
and the other an unknown man, held up the coach near Morrison
and secured about $3,000. Brown loafed around Denver until his
money was all gone, when he stole a team of mules from a man in
West Denver, and skipped out, but was captured with the mules in
Jefferson county by Marshal Hopkins. Brown was brought to Denver
and put in jail, while Gen. Cook was serving his second term as
sheriff. When Sheriff Willoughby took charge in 1873, Brown slipped
away from the jailer and concealed himself until he had an
opportunity to escape. He went to Cheyenne, and from there to
Laramie City, where he was killed in a drunken row.
Gen. Cook secured Brown’s map, and a full account of the outlaw’s
career substantially as given here, and although he has had many
opportunities to sell it to parties who wished to hunt for the
treasure, he declined all of them, preferring rather to wait for the
publication of this work. There is no question but that the treasure is
still hidden in the mountain, and, although the topography of the
country has been changed somewhat in the last thirty-three years by
forest fires, floods and snow-slides, some one may yet be fortunate
enough to find it.

CAPTURE OF THE ALLISON GANG.


CHAPTER IV.
A BAND OF STAGE ROBBERS IN
SOUTHERN COLORADO TERRORIZE
THE WHOLE COUNTRY—THEY EVEN
LOOT ENTIRE TOWNS—A BIG
REWARD OFFERED—CAPTURED BY
FRANK HYATT, ONE OF THE
SHINING LIGHTS OF THE
ASSOCIATION, WITHOUT A SHOT
BEING FIRED.
Frank A. Hyatt, of Alamosa, Colo., assistant superintendent of the
Rocky Mountain Detective Association for the district embracing
Arizona, New Mexico and southern Colorado, has a greater string of
captures of criminals and desperadoes to his credit than any other
officer in that section. He served three years as city marshal of
Alamosa, when that town was accounted one of the toughest places
in the Southwest, and has been for twenty years deputy sheriff of
Conejos county, Colorado. The people of that section have learned to
appreciate his worth, and when desperate criminals are to be taken
Frank Hyatt is the first man called upon. Plain, modest and
unassuming, Mr. Hyatt does not pose as a man-killer, although he
has more than once taken his life in his hands in desperate
encounters with criminals, and has been compelled to take human
life to save his own. His rule has been to capture his men by
strategy, leaving the law to deal justice to them, rather than to kill
them in trying to make arrests. He is still deputy sheriff of Conejos
county, and his name is as much of a terror to evil-doers as of old,
although he does not employ as much of his time in hunting bad
men as he did in the early ’80’s. In fact, the bad men have learned
to shun his section pretty carefully.
Mr. Hyatt is engaged in the manufacture and sale of a patent
handcuff, the best thing of the kind made, of which he is also the
inventor. It is known as the “Dead Cinch,” and once it is snapped on
a prisoner he can not escape. Give him the key and he can not
unlock it; still his hands have more freedom than with the old-style
handcuff. One hand can be loosened to allow the prisoner to feed
himself, while the other is held fast in its grip. It is almost
indispensable to officers, who have charge of desperadoes, or even
of the insane, as hundreds of sheriffs, policemen and other officers
scattered over Colorado, New Mexico, Arizona and Utah can attest.

“DEAD CINCH” HAND CUFFS.

One of Mr. Hyatt’s greatest exploits was the capture of the Allison
gang of stage robbers in 1881, shortly after he became a member of
the association. This gang was composed of Charles Allison, Lewis
Perkins and Henry Watts. Allison was a Nevada horse thief, who had
escaped from Sheriff Mat. Kyle, of Virginia City, while that officer was
conveying him to the state penitentiary at Carson City, after his
conviction and sentence for ten years, in 1878, by jumping from the
train. He made his escape and came to Colorado. In some way he
ingratiated himself into the good opinion of Sheriff Joe Smith, of
Conejos county, and was made a deputy sheriff. For a time he
performed the duties of his position very satisfactorily, but he finally
drifted into the holdup business, while still a deputy sheriff, with
Perkins and Watts as his partners.
Alamosa, in the spring of 1881, was the terminus of the Denver and
Rio Grande railroad, and stages ran from there in nearly every
direction. This afforded a fruitful field for the robbers and in less
than a month they had robbed five coaches, securing plunder worth
several thousand dollars. Emboldened by their successes, they
decided to operate on a larger scale, and riding into Chama, N. M.,
they terrorized the inhabitants by firing off their revolvers. When
most of the inhabitants had sought places of safety, they went
through the stores at their leisure, taking all the money they could
find and what other stuff they wanted. A few days later they
repeated the experiment at Pagosa Springs, Colo., and were again
successful.
By this time the people were thoroughly aroused. Gov. Pitkin offered
$1,000 reward for the capture of Allison, and $250 each for the
other two, and the stage company offered an additional $250, which
last, we may remark parenthetically, was never paid.
Notwithstanding the heavy rewards offered, no one seemed to care
about hunting up the outlaws. They were known to be well armed
and equipped, and it was thought that as they would in all
probability be lynched if caught, they would not surrender, preferring
rather to die fighting. Judge Hayt, now chief justice of the state
supreme court, was at that time district attorney for the twelfth
district, with headquarters at Alamosa. He sent for Hyatt and asked
him if he would not go after the robbers if he would issue a warrant.
He replied that while everybody thought they couldn’t be taken, and
that he was only a young and inexperienced officer, he would do his
best.
Hayt issued the warrant, and Hyatt secured the services of Hank
Dorris, an old ranchman, on whom he could rely; Miles Blaine, an
Alamosa saloon keeper, and Cy. Afton, a painter, and at once started
after the gang. It was soon learned that they had gone almost due
south from Chama, and Hyatt divined immediately that they had
gone to Albuquerque, N. M. Putting his men on the train, they all
rode to Española, the end of the road, and from there they went by
stage on to Santa Fe, and then took the train for Albuquerque. Hyatt
felt sure that the robbers would cross the Rio Grande at that point,
so he put his men to guarding the bridge, while he inquired about
town to learn whether they had already passed through or not. He
could find no traces of them, so he concluded that they had not yet
reached the city. After waiting all day and all night, Hyatt decided to
leave his men there, and go back up the road himself to Bernalillo,
eighteen miles above, to look for them there.
Hyatt got off the train at Bernalillo and went into a restaurant to get
breakfast, and while he was eating who should walk in but the very
men he was after! They set their three Winchesters by the door, and
as they seated themselves at the table Allison drew his two revolvers
from his belt and laid them on his lap.
It was a trying moment. Allison had been slightly acquainted with
Hyatt, while they were both serving as deputy sheriffs of Conejos
county, and had the detective given a sign of recognition would have
shot him dead before he could reach a gun. Hyatt’s face remained as
immovable as that of the Sphinx. He simply looked up, said “Good
morning, gentlemen,” and went on nonchalantly eating his breakfast.
His conduct disarmed the suspicions of the men, and when he had
finished his meal he walked out as unconcernedly as if there were no
stage robbers within a thousand miles. He went to the depot, where
he could watch their movements, and when they had come out and
rode off southward sent a dispatch to his assistants at Albuquerque
to meet them on their way, and telling them that he would follow on
horseback. Then he went to looking for a horse. There was none to
be had. Finally an old Mexican drove in with two fine horses hitched
to a wagon. After some parley, he agreed to furnish a horse and go
with Hyatt for $100. They set out and followed the robbers, keeping
within sight of them, until they stopped about two miles from
Albuquerque.
Meanwhile they had seen no signs of Dorris, Blaine and Afton, who
should have met them before this. Hyatt and the Mexican cut across
toward town and found their men just saddling up to start, having
only just then received the telegram. The robbers had camped
within sight of town, and Hyatt thought they might be decoyed into
town and taken without bloodshed. He knew that somebody would
be killed if they attempted to capture them in their camp.
At this juncture, Jeff Grant, a liveryman, volunteered to go out to the
robbers’ camp and try to bring them in. He got on a bareback horse,
and pretended to be looking for horses that had strayed off. He went
up to the camp, inquiring about horses, and finally struck up a
conversation with them. Allison told him they were on their way to
Lincoln county, N. M., Grant fell in with the idea at once, and told
Allison that he wanted to go down there himself about the 19th of
June (this was Saturday, the 17th), and would like to have them wait
and go with him. They claimed they were short of funds, but Grant
told them that he owned a livery stable, and that it should not cost
them anything to stay over a couple of days and rest up. He added
that the reason he wanted them to go with him was that he was
going to take down a string of race horses and quite a sum of
money to back them with, and as the country was infested with
thieves and desperadoes, he did not like to go alone.
Larger Image

Arrest of the Allison Gang at Albuquerque by Marshal Hyatt.

This decided the robbers. Here was a good chance to rest up their
jaded animals at some one else’s expense, and also a prospect of
some very good picking afterward. Of course, they would wait and
go along with him if that was the case.
Pretty soon Hyatt and his men saw the four men come riding into
town. They hastily concealed themselves in the barn, Hyatt climbing
into the hay mow, and the others getting back in the mangers. They
had but a minute to wait. The men rode into the barn, dismounted,
and Grant led the horses back.
The three men stood close together. “Throw up your hands!”
commanded Hyatt. They hesitated a moment, but when they caught
the gleam of a Winchester only a few feet from their heads, three
pairs of hands shot up instanter. They were disarmed and put in
chains in a few moments, and telegrams were sent out announcing
their capture.
Some of the local authorities were disposed to interfere in the case,
and to avoid any trouble in getting a requisition, Hyatt agreed to
turn over the $500 reward offered by Gov. Shelton of New Mexico to
them. It was a cowardly holdup, but Hyatt couldn’t well help himself,
as the big end of the reward was offered by Gov. Pitkin, and he had
to get the prisoners to Colorado in order to get it.
They were allowed to depart with their prisoners, and in due time
reached Alamosa without further incident. They placed them in jail,
and Hyatt, almost worn out with loss of sleep, went home and went
to bed. In a few minutes he was awakened by a messenger from
Mayor Broadwell saying that a mob was being formed to take the
prisoners from the jail and lynch them. Hyatt at once gathered a
crowd of his friends, among whom were Judge Hayt, Mayor
Broadwell, Hon. Alva Adams, now governor of Colorado, and a
number of others, and took the prisoners from the jail, put them in a
caboose with an engine attached, which the mob had provided to
take them outside of town before stringing them up, and signalled to
the engineer to pull out, with an angry mob of several hundred
following.
They escaped from the mob, and the next day the three prisoners
were placed behind the bars of the Arapahoe county jail at Denver.
Gov. Pitkin promptly paid Mr. Hyatt the $1,500 reward, and gave him
$50 out of his own pocket.
When the excitement had partially subsided the three men were
taken back to Conejos, the county seat, tried, convicted, and
sentenced to the pen for thirty-seven years each.
Perkins was pardoned out after having served eight years, and is
now running a big saloon and gambling hall at Trinidad, and is
supposed to be worth at least $25,000. Allison was pardoned after
having served ten years, and is now tending bar in a Butte City,
Mont., saloon under an assumed name. Watts, the third member of
the gang, was pardoned out at the same time Allison was let out,
and afterward joined a band of train robbers and was killed in
Arizona about two years ago.

A COWBOY’S SAD FATE.

You might also like