ebook img

MATLAB for Electrical and Computer Engineering Students and Professionals: with Simulink PDF

662 Pages·2013·7.73 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview MATLAB for Electrical and Computer Engineering Students and Professionals: with Simulink

‡ MATLAB for Electrical and Computer Engineering Students and Professionals (cid:1) with Simulink ‡ MATLAB for Electrical and Computer Engineering Students and Professionals (cid:1) with Simulink Roland Priemer University of Illinois at Chicago Edison, NJ scitechpub.com PublishedbySciTechPublishing,animprintoftheIET. www.scitechpub.com www.theiet.org Copyright†2013bySciTechPublishing,Edison,NJ.Allrightsreserved. Nopartofthispublicationmaybereproduced,storedinaretrievalsystemortransmittedinanyformorbyany means,electronic,mechanical,photocopying,recording,scanningorotherwise,exceptaspermittedunderSections107 or108ofthe1976UnitedStatedCopyrightAct,withouteitherthepriorwrittenpermissionofthePublisher,or authorizationthroughpaymentoftheappropriateper-copyfeetotheCopyrightClearanceCenter,222RosewoodDrive, Danvers,MA01923,(978)750-8400,fax(978)646-8600,oronthewebatcopyright.com.RequeststothePublisher forpermissionshouldbeaddressedtoTheInstitutionofEngineeringandTechnology,MichaelFaradayHouse,SixHills Way,Stevenage,Herts,SG12AY,UnitedKingdom. Whiletheauthorandpublisherbelievethattheinformationandguidancegiveninthisworkarecorrect,allparties mustrelyupontheirownskillandjudgementwhenmakinguseofthem.Neithertheauthornorpublisherassumes anyliabilitytoanyoneforanylossordamagecausedbyanyerrororomissioninthework,whethersuchanerroror omissionistheresultofnegligenceoranyothercause.Anyandallsuchliabilityisdisclaimed. 1098765432 ISBN978-1-61353-188-4(paperback) TypesetinIndiabyMPSLimited PrintedintheUSAbySheridanBooks,Inc. PrintedintheUKbyHobbsthePrintersLtd Contents Preface xi (cid:1) 1 MATLAB Environment 1 (cid:1) 1.1 Default MATLAB Desktop 1 1.2 Quick Start 4 (cid:1) 1.3 Default MATLAB Desktop Continued 8 (cid:1) 1.4 Built-in MATLAB Functions 12 (cid:1) 1.5 MATLAB Variables 12 (cid:1) 1.6 MATLAB Statements 16 (cid:1) 1.7 MATLAB Elementary Math Functions 21 1.8 Help Facility 23 1.9 Conclusion 26 Further reading 27 Problems 28 2 Programs and Functions 33 2.1 Current Folder 33 2.2 Program Development 34 2.3 Electric Current and Voltage 35 2.3.1 Current 35 2.3.2 Voltage 38 2.3.3 Resistor 40 2.4 Program Development Continued 41 2.5 Functions 48 2.5.1 Anonymous Function 49 2.5.2 Inline Function 50 2.5.3 eval Function 51 2.5.4 Primary Function 52 2.5.5 Sub-Function 57 2.5.6 Private Function 57 2.5.7 Nested Function 58 2.5.8 Function Function 59 2.6 Code Analyzer 63 vi Contents 2.7 p-Code 64 2.8 Tool Box 65 2.9 Conclusion 66 Problems 68 3 Matrices, Vectors, and Scalars 75 3.1 Matrix Definition 75 3.2 Matrix Arithmetic 80 3.3 Method of Least Squares 86 3.4 Function of a Matrix 92 3.5 Solution of a Set of Linear Equations 93 3.5.1 Gauss–Jordan Elimination 100 3.6 Special Matrix Manipulations 103 3.6.1 Extracting a Sub-Matrix 103 3.6.2 Building a Matrix 105 3.7 Resistive Circuit Analysis 109 3.7.1 Component Circuit Analysis 110 3.7.2 Nodal Analysis 115 3.7.3 Loop Analysis 116 3.8 Linear Transformations 118 3.8.1 Vector Space 118 3.8.2 Rotation 121 3.8.3 Eigenvalues and Eigenvectors 123 3.9 Singular Value Decomposition 126 ¼ 3.10 Accuracy of the Solution of AX Y 129 3.11 System of Nonlinear Equations 135 3.12 Conclusion 139 Further reading 140 Problems 141 4 Program Flow Control 149 4.1 Relational Operators 149 4.2 Logical Operators 152 4.3 If–Elseif–Else–End 154 4.4 For Loop 157 4.4.1 Probability 164 4.4.2 Median Filtering 171 4.5 While Loop 176 4.6 Method of Steepest Descent 178 4.7 Numerical Integration 181 4.7.1 Euler’s Method 182 4.7.2 Trapezoidal Rule 185 4.7.3 Built-in Integration Functions 186 Contents vii 4.8 Switch–Case–Otherwise 188 4.9 Conclusion 190 References 192 Problems 193 5 Binary Data 201 5.1 Boolean Algebra 201 5.2 Binary Numbers 205 5.2.1 Base Ten to Binary Conversion 205 5.2.2 ASCII Codes 207 5.2.3 Storage Allocation 209 5.2.4 Binary Arithmetic 211 5.2.5 Floating Point Notation 214 5.3 Logic Gates 216 5.4 Boolean Functions 218 5.5 Quantization Error 226 5.6 Conclusion 236 Further reading 237 Problems 237 6 Complex Numbers 243 6.1 Origin of Complex Numbers 243 6.2 Rectangular Form and Complex Arithmetic 247 6.3 Polar Form and Complex Arithmetic 254 6.4 Euler’s Identity 257 6.5 Fourier Series 261 6.6 Energy 267 6.7 Impedance 270 6.8 AC Circuit Analysis 273 6.9 Operational Amplifier 280 6.10 Conclusion 284 Problems 285 7 Character Data 291 7.1 Character Strings 291 7.2 Manipulate and Search Character Strings 295 7.3 Structure Arrays 297 7.4 Cell Arrays 308 7.5 Conclusion 311 Problems 311 viii Contents 8 Input/Output 317 8.1 Output 317 8.1.1 Text Output 317 8.1.2 Binary Output 326 8.2 Input 328 8.3 File Management 334 8.4 Sound 336 8.5 Conclusion 341 Problems 341 9 Graphics 347 9.1 Figure 347 9.2 Plots 352 9.2.1 2-D Plots 352 9.2.2 Multiple 2-D Plots 363 9.3 Edit GUI 374 9.4 Color Map 380 9.5 3-D Plots 382 9.5.1 3-D Line Plots 382 9.5.2 3-D Surface Plots 385 9.5.3 3-D Rotation 391 9.6 Movies 394 9.7 Conclusion 403 Problems 404 10 Debugging 413 10.1 Syntax Error Debugging 413 10.2 Run-Time Error Debugging 417 10.2.1 Error and Warning Messages 421 10.2.2 Breakpoints 424 10.3 Conclusion 430 Problems 431 11 Symbolic Math 435 11.1 Symbolic Objects and Expressions 435 11.2 Variable Precision Arithmetic 449 11.3 Algebra 450 11.4 Differentiation 457 11.5 Integration 463 11.6 Conclusion 468 Problems 468 Contents ix 12 Signals and Systems 477 12.1 Signal Analysis 477 12.1.1 Discrete Fourier Transform 481 12.1.2 Inverse Discrete Fourier Transform 492 12.1.3 Windows 494 12.1.4 Non-Stationary Signals 499 12.2 Continuous Time Systems 506 12.3 Response of LTI Continuous Time Systems 509 12.3.1 Zero-Input Response 510 12.3.2 Zero-State Response 513 12.3.3 State Variables 514 12.3.4 Impulse Response 527 12.3.5 Convolution 531 12.3.6 Stability 536 12.3.7 Steady-State Response 536 12.4 Discrete Time Systems 542 12.5 Response of LTI Discrete Time Systems 543 12.5.1 Zero-Input Response 549 12.5.2 Zero-State Response 551 12.5.3 State Variables 551 12.5.4 Impulse Response 555 12.5.5 Convolution 556 12.5.6 Stability 557 12.5.7 Steady-State Response 557 12.6 Ideal Digital Filters 563 12.7 Conclusion 565 Further reading 566 Problems 566 (cid:1) 13 Introduction to Simulink 575 (cid:1) 13.1 Simulink Environment 575 13.2 Dynamic Systems 582 13.3 Custom Blocks 591 13.4 Conclusion 598 Problems 599 AppendixA:Suggestionsfor ReportingSolutionsto Endof Chapter Problems 611 AppendixB:Table of ASCIICodes 613 AppendixC:Answers to Selected Problems 617 Index 625

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.