WilliamJ PalmIII is Emeritus Professor of Mechanical Engineering at the University of Rhode Island In 1966 he received a BS from Loyola College in Baltimore, and in 1971 a PhD in Mechanical Engineering and AstronauticalSciencesfromNorthwesternUniversityinEvanston,Illinois.
During his 44 years as a faculty member, he taught 19 courses One of these is a freshman MATLAB course, which he helped develop He has authored eight textbooks dealing with modeling and simulation, system dynamics, control systems, and MATLAB. These include System Dynamics, 3rd ed. (McGraw-Hill, 2014). He wrote a chapter on control systems in the MechanicalEngineers’ Handbook, 3rd ed (M Kutz, ed, Wiley, 2016), and was a special contributor to the fifth editions of Statics and Dynamics, both by J L Meriam and L G Kraige (Wiley,2002).
Professor Palm’s research and industrial experience are in control systems, robotics, vibrations, and system modeling He was the Director of the Robotics Research Center at the University of Rhode Island from 1985 to 1993, and is the coholder of a patent for a robot hand. He served as Acting Department Chair from 2002 to 2003. His industrial experience is in automated manufacturing; modeling and simulation of naval systems, including underwater vehicles and tracking systems; and design of control systems for underwater-vehicle enginetestfacilities
CHAPTER 8 Linear Algebraic Equations
8 1 MatrixMethodsforLinearEquations
8.2 TheLeft-DivisionMethod
8.3 UnderdeterminedSystems
8 4 OverdeterminedSystems
8 5 AGeneralSolutionProgram
8.6 Summary
CHAPTER 9 Numerical Methods for Calculus and Differential Equations
An Instructor’s Manual is available online for instructors who have adopted this text This manual contains the complete solutions to all of the Test Your Understanding exercises and to all of the chapter problems. The text websitealsohasdownloadablefilescontainingPowerPointslideskeyedtothetextandsuggestionsforprojects
In this text we use typewriter font to represent MATLAB commands, any text that you type in the computer, and any MATLAB responses that appear on the screen, for example, y = 6*x Variables in normal mathematics text appear in italics, for example, y = 6x We use boldface type for three purposes: to represent vectors and matrices in normal mathematics text (for example, Ax = b), to represent an action on the keyboard (for example, pressEnter), and to represent the name of a screen menu or an item a menu when it is the object of an action (for example, click on File) It is assumed that you press the Enter key after you type a command We do not show thisactionwithaseparatesymbol
Starting MATLAB
DESKTOP
To start MATLAB on a Windows system, double-click on the MATLAB icon You will then see the MATLAB Desktop. The Desktop manages the Command window and a Help Browser as well as other tools. The Desktop may appear differently in different versions of MATLAB, but the basic features should be similar to those discussed here The default appearance of the Desktop in MATLAB version R2017b is shown in Figure 11–1 Four windows appear. These are the Command window in the center, the Workspace window in the right, the Details window in the lower left, and the Current Folder window in the upper left. Across the top of the Desktop are a row of menu names and a row of icons called the Toolstrip The default Desktop shows three tabs: HOME, PLOT, and APPS. Use of these tabs is discussed in Section 1.2. To the right of the tabs is a box showing the Shortcut button that enables you to create easy access to commonly used procedures. The remaining items in the box are used for more advanced features and are initially inactive We will describe the various menus later in this
6 statements Later we will discuss the differences between these types, but for now, to simplify the discussion, we will call the instructions by the generic name commands MATLAB displays the prompt (>>) to indicate that it is ready to receive instructions Before you give MATLAB instructions, make sure the cursor is located just after the prompt Ifit isnot, usethemousetomovethecursor ThepromptintheStudentEditionlookslike EDU >> We will use the normal prompt symbol >> to illustrate commands in this text The Command window in Figure11–1showssomecommandsandtheresultsofthecalculations Wewillcoverthesecommandslaterinthischapter
Three other windows appear in the default Desktop. The Current Folder window is much like a file manager window; you can use it to access files Double-clicking on a file name with the extension m will open that file in the MATLAB Editor The Editor is discussed in Section 14 Figure 11–1 shows the files in the author’s folder Examples.
Underneath the Current Folder window is the Details window. It displays the first comment (if any) in the file Note that four file types are shown in the Current Folder These in order are a MATLAB script file, a JPEG figure file, a MATLAB user-defined file, and a Simulink model file These have the extensions m, jpg, m, and .mdl,respectively.Eachfiletypehasitsownicon.Wewillcovermfilesinthischapter.Theotherfiletypeswillbe coveredinlaterchapters Youcanhaveotherfiletypesinthefolder
VARIABLE
The Workspace window appears to the right The Workspace window displays the variables created in the Command window. Double-click on a variable name to open the Variables Editor, which is discussed in Chapter 2
You can alter the appearance of the Desktop if you wish For example, to eliminate a window, just click on its Close-window button (×) in its upper right-hand corner. To undock, or separate the window from the Desktop, click on the button containing a curved arrow An undocked window can be moved around on the screen You can manipulate other windows in the same way. To restore the default configuration, click on Layout in the toolbar,andselectDefault
TestYourUnderstanding
T11-1 ExperimentwithyourDesktop Type ver attheprompttoseewhatMATLABversionyouareusing andtoseedetailsaboutyourcomputer IfyouarenotusingversionR2017a,findthewindowsdiscussed inthissection ExaminethetoolbartolocateitemssimilartothoseshowninFigure11–1
speed he ran towards him, thankful to find his comrade alive, and still more so to find that Kaye could both see and speak.
There was no time for questions. The sharp whine of a bullet, quickly followed by others, gave stern warning that a Hun patrol had arrived upon the scene. Derek could discern several field-grey figures advancing rapidly across the untilled fields, the nearmost being only eight hundred yards away. Grasping Kaye's arm, Derek ran. It was a case of discretion being the better part of valour. With bullets whizzing past their heads, the two pilots succeeded in reaching EG 19, through the planes of which the German missiles were cutting furrows in the doped canvas.
Assisting Kaye to mount the fuselage, and telling him to throw himself at full length in the wake of the pilot's seat, Derek swung the prop. The motor fired, faltered, and stopped. Advancing the spark at the risk of a back-fire, he made a second attempt—this time successfully.
Daventry rose across the wind. It was a precarious business, but, with a dozen Boches running with the wind, and only a short distance away, there was very little choice in the matter. Pursued by a fusillade of innocuous shots, the monoplane climbed rapidly and steeply to a height of two thousand feet.
A thump in the ribs made Derek turn his head. Kaye was hanging on with one hand and pointing to the only serviceable machine-gun with the other. Daventry understood: his companion was mutely proposing that they should return and give the Hun patrol a little lesson upon the folly of attempting to fire upon a serviceable British machine.
"Work it, then!" bawled Derek, and, putting the 'bus into a steep vol-plane, he made for the spot where the Huns, winded by their long run over heavy ground, were gathered in a tempting group in the open.
Directly the Boches saw that the biplane was descending in their direction they scattered. The field was dotted with grey-clad figures making a bolt for cover that did not exist.
"We've got 'em cold!" exclaimed Derek, as the machine, moving at will at a speed of over a hundred miles an hour, was directly above the heads of the terrified men, who at their best were not able to run at one-tenth the rate of the biplane. "Why the deuce isn't Kaye turning on the tap?"
He waited in vain to catch the rapid reports of the deadly weapon. The opportunity passed. EG 19 was beyond her quarry. To ensure opening fire, the biplane had to turn again to approach the panicstricken Huns.
Derek glanced over his shoulder to find Kaye feverishly manipulating the mechanism of the gun. Like its fellow, the weapon had jammed at an awkward moment.
"'Pose some sort of good luck attends even Huns at times," he soliloquized. "There's one blessing, I've scared 'em stiff. Now for home."
He laughed to himself at the idea of calling the ramshackle collection of huts comprising the aerodrome as "home", then, putting the old 'bus up, he turned towards the British lines.
In spite of a load well above that for which it was constructed, the single-seater behaved magnificently. Derek took her up to nine thousand feet in order to cross the opposing lines at a fairly safe height, as far as danger from gun-fire from the ground was concerned.
Presently he caught sight of an object in the air at about a distance of two miles. It resembled an inverted bottle with a stumpy neck.
By the aid of his maps Derek succeeded in locating his position. He was a good twelve miles to the south-east of the aerodrome, which, considering the various side-shows connected with his patrol, was hardly to be wondered at.
Then, with less than a gallon of petrol on board, EG 19, despite her bullet-wounds and the weight of a passenger, made a good landing almost at the entrance to the hangar.
"Feel a bit rotten," admitted Kaye, as ready hands assisted him to the ground. "Not a bad stunt, was it? A sticky time, but——"
His voice trailed off into an indistinct murmur.
"Hang on to him, somebody," shouted Derek, leaping from his 'bus.
Supported by two other pilots Kaye was carried off, while Derek, knowing that all that could be done for his chum would be done, hastened to make his report to the Flight-Commander.
As soon as possible he made his way to the field-hospital where Kaye had been carried. The pilot was still unconscious, suffering from no less than three shrapnel-wounds, in addition to being severely burnt by the flaming petrol and shaken by his involuntary crash.
"Wonder if it will be a Blighty business?" thought Derek. "He'll be horribly sick about it if the war's over before he's out again. But, by Jove! it looks like it. We've got Fritz cold."
CHAPTER XII
"'Bus in difficulties," he shouted. "Slow down, and see what happens."
The speed of the car diminished. The biplane was vol-planing in short spirals immediately above. Evidently the engine had "konked out" and the pilot was seeking a suitable landing-ground.
Down came the machine, pancaking badly. Both tyres burst simultaneously with a loud report, while the tail rose in the air like a mute signal of distress.
Out of the pilot's seat clambered a figure dressed in the regulation outfit. Hardly troubling to examine the damage to his 'bus, he pushed up his fur-rimmed goggles, and, waving his arms, began to run towards the road with the intention of attracting the attention of the driver of the motor.
Derek gave orders to stop, and awaited the arrival of the pilot.
"Mornin', Jimmy," exclaimed the new-corner, on seeing that Derek wore the R.A.F. uniform. "Can you give me a lift as far as Le Tenetoir aerodrome?"
"That's where I'm bound for, old son," replied Derek. "What's wrong?"
"Run out of petrol. Union leaking, I fancy. Rotten old 'bus—never gave a fellow a chance. They are all alike, dash 'em."
"Jump in," interrupted Daventry brusquely. "I'm in a hurry. No, not here, in the front seat, if you please. Right-o!—full speed ahead, driver; let her rip!"
Derek leant back against the cushions, and, holding his precious dispatch-case with one hand, meditatively contemplated the castoroil-stained back of the airman in front.
With a sudden jerk the car pulled up before the sentry at the entrance to Le Tenetoir aerodrome. It did the tyres no good, but the driver chose the lesser of two evils, since it was decidedly unhealthy to ignore a challenge in war-time, especially when a sentry is smart with his trigger-finger.
"Thanks, old bird!" exclaimed the pilot of the disabled machine, taking advantage of the car being at a standstill, and alighting agilely. "Good of you to bring me home, you blinking Samaritan. See you later in the mess. I'll be on the look-out for you."
Derek signed to the driver to keep the car stationary, then, when the stranger was out of earshot:
"Who is that officer, sentry?"
"Dunno, sir," replied the man. "We gets such a lot o' new officers 'ere it's no tellin' who's who."
"Thank you," replied the Lieutenant. "Carry on, driver."
Arriving at the orderly-room, Derek handed over his documents, and waited until the C. O. had drafted a reply and had passed it on to be typewritten. By the time the official reply was in order, nearly half an hour had gone.
This part of the business completed, Derek was free to commence his return journey. Instead, he strolled into the officers' mess, where he was not surprised to find that the man he had befriended was not present.
He looked round to see if he knew any of the crowd of flying-men. To his satisfaction he recognized a pilot who had been with him at Averleigh.
"Hallo, Canterbury!" he exclaimed. "So you're out here?"
"Carry on; remove the prisoner," ordered Lieutenant Canterbury.
The formalities before the Adjutant having been completed, the accused, still protesting that it was all an idiotic mistake, was removed to the guard-room. On being subjected to a strict search— which resulted in the discovery of nothing of an incriminating nature —the prisoner was informed that he would be given facilities for proving his identity, and that no doubt some of his brother officers would appear to establish his innocence.
Then, to the surprise of all present, the accused turned to Derek.
"You are very smart," he remarked in quite a casual way. "I am Count von Peilfell. I should like to know how you spotted me?"
"Considering that we were flying side by side a short while ago," replied Derek, "and you were making faces at me the whole time (perhaps you recollect the incident), I think I've good cause to recognize you again."
"Der Teufel!" ejaculated the Count. "It was a thousand pities that on that occasion my ammunition was expended."
"I am sorry to hear that," replied the British pilot enigmatically.
CHAPTER XIII
The Count's Ruse
Count Hertz von Peilfell, on finding himself alone under lock and key, began to rave in genuine Teutonic style. He realized that he had