100% found this document useful (7 votes)
34 views

Essentials of MATLAB Programming 3rd Edition Chapman Solutions Manualdownload

The document provides links to various solution manuals and test banks for MATLAB programming and other subjects. It includes a detailed explanation of MATLAB script files and functions, including their differences, advantages, and a sample function for sorting arrays. Additionally, it presents functions for trigonometric operations in degrees.

Uploaded by

bobiernobou
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 (7 votes)
34 views

Essentials of MATLAB Programming 3rd Edition Chapman Solutions Manualdownload

The document provides links to various solution manuals and test banks for MATLAB programming and other subjects. It includes a detailed explanation of MATLAB script files and functions, including their differences, advantages, and a sample function for sorting arrays. Additionally, it presents functions for trigonometric operations in degrees.

Uploaded by

bobiernobou
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

Essentials of MATLAB Programming 3rd Edition

Chapman Solutions Manual download

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

Explore and download more test bank or solution manual


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

MATLAB Programming for Engineers 5th Edition Chapman


Solutions Manual

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

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/

Introduction to MATLAB 3rd Edition Etter Solutions Manual

https://testbankfan.com/product/introduction-to-matlab-3rd-edition-
etter-solutions-manual/

Contemporary Marketing 2013 Update 15th Edition Boone Test


Bank

https://testbankfan.com/product/contemporary-
marketing-2013-update-15th-edition-boone-test-bank/
Child Development A Cultural Approach 1st Edition Arnett
Test Bank

https://testbankfan.com/product/child-development-a-cultural-
approach-1st-edition-arnett-test-bank/

Intermediate Algebra Functions and Authentic Applications


5th Edition Jay Lehmann Solutions Manual

https://testbankfan.com/product/intermediate-algebra-functions-and-
authentic-applications-5th-edition-jay-lehmann-solutions-manual/

Principles of Operations Management 9th Edition Heizer


Test Bank

https://testbankfan.com/product/principles-of-operations-
management-9th-edition-heizer-test-bank/

Assembly Language For X86 Processors 7th Edition Irvine


Solutions Manual

https://testbankfan.com/product/assembly-language-
for-x86-processors-7th-edition-irvine-solutions-manual/

Maternity Nursing An Introductory Text 11th Edition Leifer


Test Bank

https://testbankfan.com/product/maternity-nursing-an-introductory-
text-11th-edition-leifer-test-bank/
Starting Out with C++ from Control Structures to Objects
8th Edition Gaddis Test Bank

https://testbankfan.com/product/starting-out-with-c-from-control-
structures-to-objects-8th-edition-gaddis-test-bank/
6. Basic User-Defined Functions
6.1 Script files are just collections of MATLAB statements that are stored in a file. When a script file is
executed, the result is the same as it would be if all of the commands had been typed directly into
the Command Window. Script files share the Command Window’s workspace, so any variables that
were defined before the script file starts are visible to the script file, and any variables created by the
script file remain in the workspace after the script file finishes executing. A script file has no input
arguments and returns no results, but script files can communicate with other script files through the
data left behind in the workspace.

In contrast, MATLAB functions are a special type of M-file that run in their own independent
workspace. They receive input data through an input argument list, and return results to the caller
through an output argument list.

6.2 MATLAB programs communicate with their functions using a pass-by-value scheme. When a
function call occurs, MATLAB makes a copy of the actual arguments and passes them to the
function. This copying is very significant, because it means that even if the function modifies the
input arguments, it won’t affect the original data in the caller. Similarly, the returned values are
calculated by the function and copied into the return variables in the calling program.

6.3 The principal advantage of the pass-by-value scheme is that any changes to input arguments within a
function will not affect the input arguments in the calling program. This, along with the separate
workspace for the function, eliminates unintended side effects. The disadvantage is that copying
arguments, especially large arrays, can take time and memory.

6.4 A function to sort arrays in ascending or descending order, depending on the second calling
parameter, is shown below:

function out = ssort1(a,dir)


%SSORT1 Selection sort data in ascending or descending order
% Function SSORT1 sorts a numeric data set into ascending
% or descending order, depending on the value of the
% second parameter. If the parameter is 'up', then it
% sorts the data in ascending order. If the parameter is
% 'down', then it sorts the data in descending order. The
% default value is 'up'. Note that 'up' and 'down' may
% be abbreviated to 'u' and 'd', if desired.
%
% Note that the selection sort is relatively inefficient.
% DO NOT USE THIS FUNCTION FOR LARGE DATA SETS. Use MATLAB's
% "sort" function instead.

% Define variables:
% a -- Input array to sort
% ii -- Index variable
% iptr -- Pointer to min value
% jj -- Index variable
% nvals -- Number of values in "a"
% out -- Sorted output array
% temp -- Temp variable for swapping
129
© 2018 Cengage Learning®. All Rights Reserved. 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/03/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


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

% If the direction argument is missing, set it to 'up'.


if nargin < 2
dir = 'up';
end

% Check for the direction of the sort


if dir(1) == 'u' | dir(1) == 'U'
sort_up = 1;
elseif dir(1) == 'd' | dir(1) == 'D'
sort_up = 0;
else
error('Second parameter is not ''UP'' or ''DOWN''!')
end

% Get the length of the array to sort


nvals = size(a,2);

% Sort the input array


for ii = 1:nvals-1

if sort_up

% Sort in ascending order.


% Find the minimum value in a(ii) through a(n)
iptr = ii;
for jj = ii+1:nvals
if a(jj) < a(iptr)
iptr = jj;
end
end

else

% Sort in descending order.


% Find the maximum value in a(ii) through a(n)
iptr = ii;
for jj = ii+1:nvals
if a(jj) < a(iptr)
iptr = jj;
end
end

end

130
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% iptr now points to the min/max value, so swap a(iptr)
% with a(ii) if ii ~= iptr.
if ii ~= iptr
temp = a(ii);
a(ii) = a(iptr);
a(iptr) = temp;
end
end

% Pass data back to caller


out = a;

A script file to test this function is shown below:

% Script file: test_ssort1.m


%
% Purpose:
% To read in an input data set, sort it into ascending
% order using the selection sort algorithm, and to
% write the sorted data to the Command window. This
% program calls function "ssort1" to do the actual
% sorting.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/03/15 S. J. Chapman Original code
%
% Define variables:
% array -- Input data array
% ii -- Index variable
% nvals -- Number of input values
% sorted1 -- Sorted data array (up)
% sorted2 -- Sorted data array (down)

% Prompt for the number of values in the data set


nvals = input('Enter number of values to sort: ');

% Preallocate array
array = zeros(1,nvals);

% Get input values


for ii = 1:nvals

% Prompt for next value


string = ['Enter value ' int2str(ii) ': '];
array(ii) = input(string);

end

% Now sort the data in ascending order


sorted1 = ssort1(array,'up');

131
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Display the sorted result.
fprintf('\nSorted data in ascending order:\n');
for ii = 1:nvals
fprintf(' %8.4f\n',sorted1(ii));
end

% Now sort the data in descending order


sorted2 = ssort1(array,'down');

% Display the sorted result.


fprintf('\nSorted data in descending order:\n');
for ii = 1:nvals
fprintf(' %8.4f\n',sorted2(ii));
end

% Now sort the data in ascending order with


% no second argument.
sorted3 = ssort1(array);

% Display the sorted result.


fprintf('\nSorted data in default order:\n');
for ii = 1:nvals
fprintf(' %8.4f\n',sorted3(ii));
end

% The follwing call should produce an error message


sorted4 = ssort1(array,'bad');

When this program is executed, the results are:

» test_ssort1
Enter number of values to sort: 6
Enter value 1: -3
Enter value 2: 5
Enter value 3: 2
Enter value 4: 2
Enter value 5: 0
Enter value 6: 1

Sorted data in ascending order:


-3.0000
0.0000
1.0000
2.0000
2.0000
5.0000

Sorted data in descending order:


-3.0000
0.0000
1.0000
2.0000

132
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
2.0000
5.0000

Sorted data in default order:


-3.0000
0.0000
1.0000
2.0000
2.0000
5.0000
??? Error using ==> ssort1
Second parameter is not 'UP' or 'DOWN'!

Error in ==> C:\data\book\matlab_essentials\3e\soln\Ex5.4\test_ssort1.m


On line 66 ==>

6.5 A set of functions to perform trigonometric operations in degrees is shown below:

function out = sind(x)


%SIND Calculate sin(x), where x is in degrees
% Function SIND calculates sin(x), where x is in degrees
%
% Define variables:
% x -- Angle in degrees

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

% Check for a legal number of input arguments.


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

% Calculate value
out = sin(pi/180*x);

function out = sind(x)


%COSD Calculate cos(x), where x is in degrees
% Function COSD calculates cos(x), where x is in degrees
%
% Define variables:
% x -- Angle in degrees

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

% Check for a legal number of input arguments.


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

133
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Calculate value
out = cos(pi/180*x);

function out = tand(x)


%TAND Calculate tan(x), where x is in degrees
% Function TAND calculates tan(x), where x is in degrees
%
% Define variables:
% x -- Angle in degrees

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

% Check for a legal number of input arguments.


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

% Calculate value
out = tan(pi/180*x);

function out = asind(x)


%ASIND Calculate asin(x), where the output is in degrees
% Function ASIND calculates asin(x), where the output is in degrees
%
% Define variables:
% x -- Input value

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

% Check for a legal number of input arguments.


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

% Calculate value
out = 180/pi * asin(x);

function out = acosd(x)


%ACOSD Calculate acos(x), where the output is in degrees
% Function ACOSD calculates acos(x), where the output is in degrees
%
% Define variables:
% x -- Input value

% Record of revisions:

134
© 2018 Cengage Learning®. All Rights Reserved. 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/03/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


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

% Calculate value
out = 180/pi * acos(x);

function out = atand(x)


%ATAND Calculate atan(x), where the output is in degrees
% Function ATAND calculates atan(x), where the output is in degrees
%
% Define variables:
% x -- Input value

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

% Check for a legal number of input arguments.


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

% Calculate value
out = 180/pi * atan(x);

function out = atan2d(y,x)


%ATAN2D Four quadrant inverse tangent, where the output is in degrees
% Function ATAN2D calculates the Four quadrant inverse tangent, where
% the output is in degrees.
%
% Define variables:
% x -- Input value

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

% Check for a legal number of input arguments.


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

% Calculate value
out = 180/pi * atan2(y,x);

A script file to test these functions is given below:

135
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% Script file: test_functions.m
%
% Purpose:
% To perform a median filter on an input data set.
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/03/15 S. J. Chapman Original code
%
% Define variables:
% ii -- Loop index
% filename -- Input data file
% n_ave -- Number of points to average
% n_per_side -- Number of points to average per side
% n_points -- Number of points in data set
% slope -- Slope of the line
% x -- Array of input values
% y -- Array of filtered values

disp('This program tests the trig functions that return answers in


degrees.');

% Set the angle theta = 30 degrees, and try the forward trig functions
disp(' ');
disp(['Testing forward trig functions:']);
disp(['sind(30) = ' num2str(sind(30))]);
disp(['cosd(30) = ' num2str(cosd(30))]);
disp(['tand(30) = ' num2str(tand(30))]);
disp(['sind(45) = ' num2str(sind(45))]);
disp(['cosd(45) = ' num2str(cosd(45))]);
disp(['tand(45) = ' num2str(tand(45))]);

% Test the inverse trig functions


disp(' ');
disp(['Testing inverse trig functions:']);
disp(['asind(0) = ' num2str(asind(0))]);
disp(['asind(1/sqrt(2)) = ' num2str(asind(1/sqrt(2)))]);
disp(['asind(1) = ' num2str(asind(1))]);
disp(['acosd(0) = ' num2str(acosd(0))]);
disp(['acosd(1/sqrt(2)) = ' num2str(acosd(1/sqrt(2)))]);
disp(['acosd(1) = ' num2str(acosd(1))]);
disp(['atand(1) = ' num2str(atand(1))]);

% Test atan2d
disp(' ');
disp(['Testing atan2d:']);
disp(['atan2d(4,3) = ' num2str(atan2d(4,3))]);

When the script file is executed, the results are:

>> test_functions

136
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
This program tests the trig functions that return answers in degrees.

Testing forward trig functions:


sind(30) = 0.5
cosd(30) = 0.86603
tand(30) = 0.57735
sind(45) = 0.70711
cosd(45) = 0.70711
tand(45) = 1

Testing inverse trig functions:


asind(0) = 0
asind(1/sqrt(2)) = 45
asind(1) = 90
acosd(0) = 90
acosd(1/sqrt(2)) = 45
acosd(1) = 0
atand(1) = 45

Testing atan2d:
atan2d(4,3) = 53.1301

6.6 A function to convert degrees Fahrenheit to degrees Celsius is shown below:

function deg_c = f_to_c(deg_f)


%F_TO_C Convert degrees Fahrenheit to degrees Celsius
% Function F_TO_C converts degrees Fahrenheit to degrees Celsius
% %
% Calling sequence:
% deg_c = f_to_c(deg_f)

% Define variables:
% deg_f -- Input in degrees Fahrenheit
% deg_c -- Output in degrees Celsius

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

% Check for a legal number of input arguments.


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

% Calculate value
deg_c = 5/9 * (deg_f - 32);

We can test this function using the freezing and boiling points of water:

>> f_to_c(32)
ans =
0
>> f_to_c(212)

137
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
ans =
100

6.7 A function to convert degrees Celsius to degrees Fahrenheit is shown below:

function deg_f = c_to_f(deg_c)


%C_TO_F Convert degrees Celsius to degrees Fahrenheit
% Function C_TO_F converts degrees Celsius to degrees Fahrenheit
% %
% Calling sequence:
% deg_f = c_to_f(deg_c)

% Define variables:
% deg_c -- Input in degrees Celsius
% deg_f -- Output in degrees Fahrenheit

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

% Check for a legal number of input arguments.


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

% Calculate value
deg_f = 9/5 * deg_c + 32;

We can test this function using the freezing and boiling points of water:

>> f_to_f(0)
ans =
100
>> c_to_f(100)
ans =
0

We can also show that c_to_f and f_to_c are the inverses of each other:

>> f_to_c(c_to_f(30))
ans =
30

6.8 A function to calculate the area of a triangle specified by the locations of its three vertices is shown
below:

function area = area2d(x1, y1, x2, y2, x3, y3)


%AREA2D Calculate the area of a triangle specified by three vertices
% Function AREA2D calculates the area of a triangle specified by
% three vertices
%
% Calling sequence:
% area = area2d(x1, y1, x2, y2, x3, y3)

138
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Visit https://testbankbell.com
now to explore a rich
collection of testbank,
solution manual and enjoy
exciting offers!
% Define variables:
% x1, y1 -- Location of vertex 1
% x2, y2 -- Location of vertex 2
% x3, y3 -- Location of vertex 3
% area -- Area of triangle

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

% Check for a legal number of input arguments.


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

% Calculate value
area = 0.5 * (x1*(y2-y3) - x2*(y1-y3) + x3*(y1-y2));

We can test this function using the specified points:

>> area = area2d(0,0,10,0,15,5)


area =
25.00

6.9 At this point in our studies, there is no general way to support an arbitrary number of arguments in a
function. Function nargin allows a developer to know how many arguments are used in a
function call, but only up to the number of arguments in the calling sequence1. We will design this
function to support up to 6 vertices. The corresponding function is shown below:

function area = area_polygon(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6)
%AREA_POLYGON Calculate the area of a polygon specified by its vertices
% Function AREA_POLYGON calculates the area of a polygon specified by
% its vertices
%
% Calling sequence:
% area = area_polygon(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6)

% Define variables:
% ii -- Loop index
% n_vertices -- Number of vetices in polygon
% x1, y1 -- Location of vertex 1
% x2, y2 -- Location of vertex 2
% x3, y3 -- Location of vertex 3
% x4, y4 -- Location of vertex 4
% x5, y5 -- Location of vertex 5
% x6, y6 -- Location of vertex 6
% area -- Area of polygon

% Record of revisions:
% Date Programmer Description of change

1 Later we will learn about function varargin, which can support any number of arguments.
139
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% ==== ========== =====================
% 04/05/15 S. J. Chapman Original code

% Check for a legal number of input arguments.


% There must be at least 3 vertices, and no more than 6.
msg = nargchk(6,12,nargin);
error(msg);

% Get the number of vertices


n_vertices = nargin / 2;

% Save vertices in arrays


x = zeros(1,n_vertices);
y = zeros(1,n_vertices);

% Save values
x(1) = x1;
y(1) = y1;
x(2) = x2;
y(2) = y2;
x(3) = x3;
y(3) = y3;
if n_vertices >= 4
x(4) = x4;
y(4) = y4;
end
if n_vertices >= 5
x(5) = x5;
y(5) = y5;
end
if n_vertices >= 6
x(6) = x6;
y(6) = y6;
end

% Calculate the area


area = 0;
for ii = 1:n_vertices-2
area = area + 0.5 * (x(ii)*(y(ii+1)-y(ii+2)) ...
- x(ii+1)*(y(ii)-y(ii+2)) ...
+ x(ii+2)*(y(ii)-y(ii+1)));
end

We can test this function using the specified point (0,0), (10,0), (10,10), and (0, 10), which
corresponds to a square with all sides having length 10:

>> area = area_polygon(0,0,10,0,10,10,0,10)


area =
100.00

We can test this function using the points specified in the problem:

>> area = area_polygon(0,0,10,0,10,10,0,10)

140
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
area =
100.00
>> area = area_polygon(10,0,8,8,2,10,-4,5)
area =
43.00

6.10 A function to calculate the inductance of a single-phase two-wire transmission line is shown below:

function ind = inductance(r, D, length)


%INDUCTANCE Calculate the inductance of a transmission line
% Function INDUCTANCE calculates the inductance of a
% single-phase two-wire transmission line.
%
% Calling sequence:
% ind = inductance(r, D, length)
%
% where
% r = the radius of the conductors in meters
% D = the distance between the two lines in meters
% length = Length of transmission line in meters

% Define variables:
% ind_per_m -- Inductance per meter

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

% Check for a legal number of input arguments.


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

% Constants
mu0 = pi * 4e-7; % H/m

% Calculate the inductance


ind_per_m = mu0 / pi * (1/4 + log(D/r));

% Get the inductance


ind = ind_per_m * length;

We can test this function using the points specified in the problem:

>> ind = inductance(0.02, 1.5, 100000)


ind =
0.1827

6.11 If the diameter of a transmission line’s conductors increase, the inductance of the line will decrease.
If the diameter of the conductors are doubled, the inductance will fall to:

>> ind = inductance(0.02, 1.5, 100000)


ind =

141
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
0.1550

6.12 A function to calculate the capacitance of a single-phase two-wire transmission line is shown below:

function cap = capacitance(r, D, length)


%CAPACITANCE Calculate the capacitance of a transmission line
% Function CAPACITANCE calculates the capacitance of a
% single-phase two-wire transmission line.
%
% Calling sequence:
% cap = capacitance(r, D, length)
%
% where
% r = the radius of the conductors in meters
% D = the distance between the two lines in meters
% length = Length of transmission line in meters

% Define variables:
% cap_per_m -- Capacitance per meter

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

% Check for a legal number of input arguments.


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

% Constants
e0 = pi * 4e-7; % F/m

% Calculate the capacitance


cap_per_m = pi * e0 / log((D-r)/r);

% Get the capacitance


cap = cap_per_m * length;

We can test this function using the points specified in the problem:

>> cap = capacitance(0.04, 1.5, 100000)


cap =
0.1097

6.13 If the distance between the two conductors increases, the inductance of the transmission line
increases and the capacitance of the transmission line decreases.

6.14 A program to compare the sorting times using the selection sort of Example 6.2 and MATLAB’s
built-in sort is shown below:

% Script file: compare_sorts.m


%
% Purpose:

142
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
% To compare the sort function from Example 6.2 and the
% built-in MATLAB sort
%
% Record of revisions:
% Date Programmer Description of change
% ==== ========== =====================
% 04/05/15 S. J. Chapman Original code
%
% Define variables:
% data1 -- Array to sort
% data2 -- Copy of array to sort
% elapsed_time1 -- Elapsed time for ssort
% elapsed_time2 -- Elapsed time for sort

% Constants
SIZE = 100000; % Number of values to sort

% Set seed
seed(123456);

% Create a sample data set to sort.


data1 = random0(1,SIZE);

% Sort using ssort


data2 = data1;
tic;
out = ssort(data2);
elapsed_time1 = toc;

% Sort using sort


data2 = data1;
tic;
out = sort(data2);
elapsed_time2 = toc;

% Display the relative times


disp(['Sort time using ssort = ' num2str(elapsed_time1)]);
disp(['Sort time using sort = ' num2str(elapsed_time2)]);

When this program is executed, the results are:

>> compare_sorts
Sort time using ssort = 71.2407
Sort time using sort = 0.0060984

The built-in sorting function is dramatically faster than the selection sort of Example 6.2.

6.15 A program to compare the sorting times using the selection sort of Example 6.2 and MATLAB’s
built-in sort is shown below.

% Script file: compare_sorts.m


%
% Purpose:

143
© 2018 Cengage Learning®. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part.
Other documents randomly have
different content
Well a representative of this KEEP THE CONVERSATION TO YOURSELF.
Departement of State called upon
me two days running, when I was out. The last time he came he left
word that he would return next morning at 10.30 sharp; and would I
please give him an interview?
I thought it wise to do so.
That unhappy blunder of mine might get me into trouble. Perhaps
the officials of the Bevolkings office were going to prosecute me for
conspiring to deceive the government. At all events I would be at
home at 10.30; and, more than that, I would be ready for my visitor
when he came.
I rose about six, and prepared for the proposed conversation as a
barrister prepares his brief.
As the man who talks most has generally the situation in his own
hand, I determined to keep the greater part of the conversation to
myself. All the likely sentences that could possibly be of avail I
copied out of the phrase-book on a sheet of foolscap. Some new
expressions and idioms were added, and committed as thoroughly as
possible to memory.
And, by the way, I made use of a fresh discovery—a number of
algemeene opmerkingen from the end of the grammar.
These were on the same lines as the material in A LITERARY FORTRESS.
the phrase-book, but much more learned. They
were for advanced students (I was rather advanced now, so to
speak,) and they had a distinct literary and scientific flavour. I went
over all these, aloud—my old and favourite plan—so as to gain
fluency and facility in uttering them.
Furthermore, not being able to trust my memory absolutely—there
was a lot of new stuff to be mastered, you see,—I hit upon a plan to
lead the conversation and keep it upon topics of my own choosing.
My strategem was of uncommon simplicity, but admirably effective
for all that.
On my table I erected a kind of informal reading-desk composed of
books and magazines; then in a hollow of this edifice, out of sight, I
placed my manuscript notes where they could easily catch my eye.
Two chairs I set carefully in position—one for myself beside my
fortress, the other for my visitor in the middle of the room in a good
clear light.
Then I awaited results.
At half past ten o’clock sharp there came a AN ASTONISHED OFFICIAL.
ring to the hall-door; and, ushered by the
obsequious landlady, in walked a young fellow fashionably dressed,
with languid manners and a general air being bored with life. He
carried a portfolio gracefully under his arm.
Without waiting for him to begin, I went up to him the moment he
entered, and shook him cordially by the hand, I relieved him of his
umbrella—he had one though the weather was fine; and as his other
hand was thus partially released, I shook it with no less heartiness.
“Blijdschap, mijnheer!” I began, “Blijdschap en vreugde! Het verblijdt
mij zeer—U te ontmoeten! Mag ik U verzoeken Uw jas af te zetten.
Wat? Nee?”
As the day was burning hot and he wore no overcoat, I didn’t insist
upon this.
“Zij het zoo, myn waarde!—Neem een stoel,” I continued. “Ga zitten,
ik bid U. Het is aangenaam weer.—Volstrekt niet koud—neen—niet
koud.”
This was well within the mark, for it was 89° in the shade.
My Dutch seemed to surprise him for he said feebly “Dag—Sir—Yes—
I mean—O ja.”
I saw he was just the kind of young man that I WAT GEBRUIKT U?
could have a pleasant talk with. But it was now
time I got back to my notes. Before sitting down however, I asked to
take charge of his hat.
“Handig mij Uw hoed over!” I said, reaching for it. When he
hesitated, I put him at his ease with an “alstjeblieft; toe dan! toe!”
Though there was an interval of a second or two whilst I was getting
behind my barricade he was too astonished to utter a sound, either
in Dutch or in English. I perceived my advantage and intended to
keep it.
“Mag ik u iets aanbieden?” I said with a wave of the hand, throwing
in some nonsense out the grammar.
“Wat gebruikt U?—ah—hm—Een—voorzetsel, bijvoorbeeld?—of—de
gebiedende wijs—of—een bijvoeglijk naamwoord? Wat—niets?”
As he still said nothing, I pointed him to my cupboards, by happy
inspiration remembering the refrain of the vendor of eatables at one
of the stations, “Bierr, limonade, spuitwater?” adding—“Bitterkoekjes
en ijskoud bier; of—een amandel broodje?”
It was well he didn’t accept, for I had none of IK BID U WELKOM.
these dainties in the house; but it sounded friendly
to offer them.
“Of,” I put in, sinking my voice to a confidential whisper, “Spreekt U
liever over de Nieuwe Electrische Tramweg? Wel, dan.—Het publiek
wordt gewaarschuwd het personeel niet in gesprek te houden.”
Very faintly came the reply, as he moved restlessly on the edge of
his chair, “Mynheer, ik kwam niet om de Tramweg.”
“Neen?” I said. “Goed. Best. Ik neem het ook niet kwalijk, mijnheer!
ik bid U welkom!—Het doet mij genoegen, na al het ongunstige weer
van verleden week, U zoo goed en wel te zien.”
The weather had been quite hot; but this was one of the good
phrases of the book, and I stuck to it.
All this appeared to increase his panic, and he glanced at the door
more than once as if he would like to make a bolt for safety.
Now I was quite in my element, and from my palissade of books I
could hurl all sorts of irrelevant politenesses at him.
“Ik verwelkom U oprechtelijk, mijnheer. U bezoek is mij oorzaak van
ongeveinsde blijdschap.”
Holding the portfolio clenched in both hands he NONSENSE LET LOOSE.
stared at me as if he was incapable of speech.
This seemed a favourable opportunity for putting in an algemeene
opmerking, which I must say had all the effect of a round shot after
infantry fire.
“Deugden en belooning gaan zelden te zamen,” I murmured
pleasantly, with a friendly gesture of deprecation. Then in a second
or two afterwards I added,—leaving him to find out the connection
as best he might,—“Water bevriest op twee-en-dertig graden.”
The more outrageous the nonsense which I repeated from my notes,
the paler he got.
He seemed to measure the distance between his seat and the door;
but I rose and walked about the room, repeating softly to myself
such phrases as I knew well, no matter what meaning they might
have—“Lamaar! pas op! niet pluis, hoor!—’t komt er niet op aan!”
Some midges were buzzing about the room. I pointed to them
saying “akelige beesten, nie waar?” And making a sudden spring
towards one that was approaching his head I impaled it, or rather
smashed it, in the approved fashion between my hands. The
fragments of the insect I displayed to him on my palm adding
triumphantly; “Dood als een pier.” He was ready to go.
Laying at last a fatherly hand upon his shoulder A LINGUISTIC VICTORY.
I genially enquired, “Vergun my te vragen,
jongeling,—hoe is het—met uwe—achtenswaardige ouders?”
“O ja, mijnheer”, he said in a breathless whisper. “Ja zeker, mijnheer.
Dank U zeer—Ik moet weg, sir. Ik heb belet—thuis—Ik moet weg—Ik
zal het U zenden.”—
And he was gone! gone, too, without his hat!
I was left master of the field.
Ringing the bell, I rushed to the landing and called after him,
“Duizendmaal vergiffenis, Bevolkings Mijnheer!—Uw hoed!”
But that hurried him only the more swiftly down those steep stairs;
and I was sincerely glad to observe that the landlady, like a good
goal-keeper, had stopped him at the door, where they entered into
earnest colloquy.
I had won this conversational contest; and half my ammunition was
not yet expended!
Eight polite sentences and about a dozen ‘algemeene opmerkingen’
remained unused, besides two general topics—‘boomkweekerij’ and
Rembrandt.
But what did he mean by ‘Ik zal het U zenden?’ HOUD UWEN BEK.
What was it that he meant to send? I devoutly
hoped there would be no further difficulty about my address, and
was just trusting I had escaped, when the landlady entered with the
words, “Hij moet zijn hoed hebbe.” Then, as she took it in her hand,
she added “Mijnheer zegt, dat het niet veilig in huis is—niet veilig,
zegt mijnheer!”
“Hij vraagt ook wat de groote letter is vóór O’Neill? Of het een J of
een I of een T of een F of een Y is, niemand op het kantoor kan het
uitmaken, Uw handschrift is zoo onduidelijk, zegt mijnheer.”
Relieved to see there was nothing worse, I went to some old copies
of the ‘Nieuws van den Dag,’ which were lying carefully folded up on
the side-table, and with a pair of scissors cut out a J from the word
Juli, pasted it hastily on a sheet of notepaper and wrote underneath
it, ‘Met veel complimenten—en de groeten.’
Yes; the interview was decidedly successful.
Yet it pales before the fame I once got by a single sentence, just
outside de Beurs-station, in Rotterdam.
I was pounced upon by an army of porters; STILL MUCH ADMIRED.
they had seized me and my bag, and were
quarrelling loudly. I said “Hush” to the worst of them, but one
brawny rascal was inclined to be insolent, and I was put upon my
mettle.
“Ik bid U—houd Uwen bek,” I said—“anders,”—and here I glanced
round for a policeman, “anders—roep ik—de Openbare Macht.”
The man ran like a hare.
I pride myself that there was dignity and firmness, courtesy and
local colour all in that one sentence.
And I find that it is still much admired.
CHAPTER XII.

DUTCH CORRESPONDENCE.

The gentleman from the Bevolkings Register Bureau had left his
umbrella behind him in his hurried departure that Thursday morning,
so I sent it back to him with a polite note. It would have been easy
to write the polite note in English, but that would never do. After my
success in carrying on a long conversation in Dutch I felt that a lapse
into English would be a confession of weakness.
My reputation as a linguist could only be maintained by a real Dutch
letter. Now the phrase book gave but little light on the vast subject
of correspondence. Except a brief note acknowledging the arrival of
a ton of coals, and a still briefer note accepting, in the third person,
a formal invitation to dinner, there was nothing about letter-writing
in the volume.
It was not easy to find any phrases out DIERBARE HOOGEDELGESTRENGE.
of these epistles suitable for working in
to my note about the umbrella.
They were valuable as examples, merely for the general rhythm and
style, as it were, and then only to a slight extent. As my missive was
of a genre quite distinct from these models, I felt justified in
composing it in my own way.
I wrote the letter first in English; then set about translating it, as
elegantly as I could, into Dutch.
Here is the English—quite friendly, you see.
Dear Sir,
As you left your umbrella behind on Thursday morning when you did
me the honour to call, I beg to send it to you by bearer, in the hope
that it may reach you safely without delay.
Trusting that its absence may have occasioned you no
inconvenience, I remain, dear sir,
Very truly yours
Jack O’Neill.
As a beginning, the phrase-book gave Hooggeachte Heer and
Hoogedelgestrenge Heer, and many more very official-looking titles.
It gave ‘mijnheer’ for ‘sir’; but for ‘dear sir’ nothing at all.
Seeing, however, that dear was lief or HET BY MIJ EENE VISITE AFLEGGEN.
dierbaar, I could easily make out a
form of friendly address:—‘Dierbare mijnheer’ or briefly ‘Dierbaar.’
It was a toss up, indeed whether to take the stiff title Hooggeachte
Heer (for Hoogedelgestrenge Heer seemed too much of a good thing
for a note about an umbrella) or this more affectionate but
somewhat doubtful Dierbaar!
I finally decided on a combination, one at the beginning and one at
the end.
I sailed along quite comfortably until I arrived at his ‘doing me the
honour to call’. This required hammering out; and when I had
tortured myself a long time over it, here is what I got: ‘wanneer gij
mij vereerdet door het bij mij eene visite afleggen’. Dreadfully round-
about, you perceive! So I just fell back upon brevity, and trusted to
luck to carry me safely through. ‘Op mij te roepen’, sounded terse
and likely; and I chose it to avoid worse pitfalls with door and the
infinitive.
As ‘I beg’ had a brusque ring, I made it a trifle mellower and more
courteous by the helpful and familiar ‘verschoon mij’. ‘Verschoon mij,
dat ik bedel,’ I could not improve on that.
But the proper division of ‘overhandigen’ into its component parts
was not easy.
To get the right ‘hang’ of this VERTROUWELIJK OR WAARACHTIG.
sentence, I forcibly detached the
‘over’, and dragged this harmless voorzetsel well forward so as not to
impede the action of its own particular verb, when you got so far.
This much improved the rhythm; and I gave myself some freedom in
the phrasing to keep up the style.
Indeed, after all, two or three bits of phrases could be worked in.
‘Goedige aanblikken’ caught my eye somewhere. I was delighted to
have a kind of equivalent for kind regards; and eschewing the
temptation to deviate into ‘zuiverlijk’ for sincerely, or ‘vertrouwelijk’
for faithfully, I finished with simple directness using ‘waarachtig’ for
truly. This I afterwards thought of changing to waarempeltjes as
being less formal.
Finally, to give a neat turn to the whole, I dropped in a sentence
from the conversation-manual, so as to refer with a light but artistic
touch to the broiling weather.
Thus the finished product assumed the THE FINISHED PRODUCT.
following form:
Hooggeachte Heer!
Aangezien dat gij in mijn zaal laatsten Donderdag morgen Uwen
regenscherm vergegeten hebt, op den datum dat gij mij de eer
deedt om op mij te roepen, en visite af te leggen, verschoon mij dat
ik bedel het geabandoneerde voorwerp beleefd over aan UEdele te
handigen door den drager dezes briefs.
Ik bemerkt niet eerstelijk dat de regenscherm de Uwe was; dus ik
vertrouw dat gij wilt pardoneeren al het verdriet dat zijne
afwezigheid veroorzaakt hebben moge.
Hoe heerlijk dat het gunstige weer van gisteren en onlangs gestadig
blijft! Ik hoop van harte dat U ervan heerlijk geniet.
Koesterende den hoop dat de regenscherm zonder oponthoud U
goed en wel zal bereiken,
Ik blijf,
Dierbaar,
met goedige aanblikken,
waarachtig de Uwe,
Jack O’Neill.
EENIGE PERSBEOORDEELINGEN.

Op hoogst geestige wijze vertelde de Heer Brown van des heeren O’Neill
onverstoorbaren ijver om Hollandsch te willen spreken, en de honderden bokken,
die de Brit schoot, deden de toehoorders soms onbedaarlijk lachen, vooral zijn
kennismaking met den heer van het bevolkingsregisterbureau, zijn onderhoud met
de waschvrouw bij het opmaken der waschlijst, zijn uitstapje naar den Haag, de
wijze waarop hij “Have jou pens” vertaalde, en de manier waarop hij zich in
verschillende winkels trachtte duidelijk te maken waren hoogst amusant. Maar
vooral de teekening van hetgeen daarbij voorviel en was op te merken, gaf ons
humor te hooren, zooals we die slechts vinden bij Dickens.
Het Nieuws van Zeist en Driebergen.

In de kleine zaal van het concertgebouw heeft de Heer J. Irwin Brown, die reeds
den vorigen winter met groot succes hier ter stede een paar lezingen hield, een
volle zaal vaak tot schier onbedaarlijk lachen gedwongen, door zijn lezing. En de
velen die hem hoorden en zich af en toe tranen lachten, hebben den redenaar
door warme toejuichingen beloond voor het genot hun verschaft,
Alg. Handelsblad.

De typische manier, waarop de Heer Brown het Hollandsch uitsprak, alsmede zijn
kalm maar hoogst humoristische wijze van voordragen “deed ’t hem.” De talrijke
aanwezigen gierden het telkens uit van ’t lachen, sommige gevallen waren bepaald
ook uiterst amusant.
Hun die nog niet het genoegen hadden de Heer Brown te hooren, kunnen wij zeer
aanbevelen zulks te gaan doen.
Telegraaf.

Behalve zijn liefde voor de Engelsche literatuur, bezit de Heer Brown ook den
kostelijken humor die zoo speciaal Britsch is, dien humor zonder eenige pretentie,
maar daarom juist zoo onweerstaanbaar.
Verslag te geven van deze voordracht is ondoenlijk. Men moet die zelf hooren om
mee te schateren van ’t lachen.
Rotterdamsch Nieuwsblad.
Dms. Brown heeft ook ditmaal weder veel succes gehad en wij zouden niet weten
wat meer te prijzen: zijn schoone “dictie” van verzen, of de geestige manier,
waarop hij “a Briton’s Difficulties in mastering Dutch” behandelde. Het laatste
bracht de lachspieren heftig in beweging en bij elken “blunder” van den Brit
schaterde het publiek het uit.
Van harte hopen wij, dat het Haarlemsche publiek het volgend jaar nog eens in de
gelegenheid zal worden gesteld dezen begaafden spreker te hooren.
Haarlemsche Courant.

”... Aan velen in den lande zijn de stukjes, hier in een bundel verzameld, reeds
bekend, want de Heer Brown heeft ze op verschillende plaatsen voorgedragen. In
een aantal recensies van die voordrachten wordt gewag gemaakt van het
onbedaarlijk gelach, dat de voordrager er mee verwekte. Het is ons bij de lezing
niet anders vergaan. We konden ons telkens niet houden van het lachen. Het
boekje is inderdaad vol onweerstaanbare vis comica.”
Nieuwe Rotterd. Courant.

... Van af de eerste tot de laatste bladzijde spreekt er uit het boekje een schat van
gezonden, ongezochten humor, afgewisseld door tal van rake opmerkingen, over
misbruiken in onze spreektaal binnengeslopen en zoo geacclimatiseerd, dat we ze
nauwelijks meer bemerkten. Zelfs Nurks zaliger nagedachtenis zou het bezit van
lachspieren gemerkt hebben, wanneer hem ooit de conversatie tusschen O’Neill
en den heer van ’t bevolkingsregister ware medegedeeld.
Als ’t waar is, dat lachen een genezenden invloed op zieken uitoefent, wagen we
“An Irishman’s difficulties with the Dutch language” als universeel-geneesmiddel
aan te bevelen, op gevaar af, ons schuldig te maken aan onbevoegd uitoefenen
der geneeskunde....
De Telegraaf.

... Het is een boekje vooral geschikt voor kniesooren en droefgeestigen. Ze zullen
er van opknappen.
De Nederlander.

... Laten ze lachen om het prachtige Hollandsche waschlijstje, om den


bliksemafleider en om de “kwast” in het cafétje, allen tot mistificaties worden,
lachen om zooveel andere dingen, als de moeilijkheden met den postambtenaar,
bij het verzenden van een postpakketje of het gesprek met den man van het
bevolkingsregister, lachen om het kostelijke briefje waarmee het boekje besluit....
“De Nieuwe Courant”.
Opmerkingen van de bewerker

De kopteksten van het oorspronkelijke boek zijn gebruikt als


zijnoten.
Duidelijke fouten met leestekens zijn stilzwijgend verbeterd.
De nummering van hoofdstuk 11 en 12 (oorspronkelijk 12 en
13) is gecorrigeerd. Bovendien zijn de volgende
veranderingen aangebracht, op bladzij
7 “change” in “chance” (There is no chance of practice unless
you get away)
16 “Incorrigble” in “Incorrigible” (interposed the First Year
Incorrigible)
17 “des” in “yes” (“Oh, yes”, said O’Neill with some show of
caution.)
29 “pakage” in “package” (errand-boy entered with a
package which he)
33 “dont” in “don’t” (I don’t care)
41 “KERCHIFF” in “KERCHIEF” (THE KERCHIEF OF QUEEN
ELIZABETH.)
41 “if” in “of” (which of course must be right)
43 “word” in “words” (A few other words I got with
comparative ease)
49 “own” in “now” (at a loss now and again)
51 “exclained” in “exclaimed” (he exclaimed with delight)
52 “inte” in “into” (and you’ll get into no end of trouble)
55 “brillantly” in “brilliantly” (The plan was brilliantly
successful.)
57 “seen” in “seem” (those horrid expressions that you seem
so fond of)
61 “myterious” in “mysterious” (draw some of this mysterious
beverage)
66 “metters” in “matters” (This did not appreciably mend
matters)
76 “exclained” in “exclaimed” (exclaimed Enderby, rising
suddenly off his seat)
81 “exlaimed” in “exclaimed” (“Neen maar!—Mijnheer!” I
exclaimed.)
88 “ADDRES” in “ADDRESS” (A FLATTERING ADDRESS.)
90 “unsuccesful” in “unsuccessful” (that I was always
unsuccessful in my conversations)
93 “delarations” in “declarations” (and filled in the
declarations all wrongly".)
97 “Layng” in “Laying” (Laying at last a fatherly hand upon
his shoulder)
97 “amunition” in “ammunition” (and half my ammunition
was not yet expended)
100 “Registers” in “Register” (The gentleman from the
Bevolkings Register Bureau)
112 “onderhond” in “onderhoud” (zijn onderhoud met de
waschvrouw).
Andere eigenaardigheden en inconsequenties in spelling en
grammatica zijn niet gewijzigd, zoals bijvoorbeeld het
afwisselend gebruik van “y” en “ij”, en het gebruik van
afbrekingsstreepjes en aanhalingstekens.
*** END OF THE PROJECT GUTENBERG EBOOK AN IRISHMAN'S
DIFFICULTIES WITH THE DUTCH LANGUAGE ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

testbankfan.com

You might also like