MatLAB 6 0 Using

Free Download

Size: 7 MB (6887155 bytes)

Pages: 904/904

File format:

Language:

Category:


Table of contents :
Development Environment……Page 25
Starting and Quitting MATLAB……Page 27
Startup Directory for MATLAB……Page 29
Startup Options……Page 31
Reducing Startup Time with Toolbox Path Caching……Page 36
Running a Script When Quitting MATLAB……Page 41
Using the Desktop……Page 43
Desktop Tools……Page 46
Launch Pad……Page 47
Opening and Closing Desktop Tools……Page 49
Resizing Windows……Page 51
Moving Windows……Page 52
Using Predefined Desktop Configurations……Page 58
Context Menus……Page 59
Keyboard Shortcuts and Accelerators……Page 60
Selecting Multiple Items……Page 61
Accessing The MathWorks on the Web……Page 62
Setting Preferences……Page 63
General Preferences for MATLAB……Page 65
Running MATLAB Functions……Page 67
Running Functions and Entering Variables……Page 68
Controlling Input and Output……Page 70
Running Programs……Page 77
Keeping a Session Log……Page 78
Preferences for the Command Window……Page 79
Viewing Functions in the Command History Window……Page 83
Running Functions from the Command History Window……Page 84
Copying Functions from the Command History Window……Page 85
Getting Help……Page 87
Types of Information……Page 89
Using the Help Browser……Page 90
Changing the Size of the Help Browser……Page 91
Using the Product Filter……Page 93
Viewing the Contents Listing in the Help Browser……Page 95
Finding Documentation Using the Index……Page 97
Searching Documentation……Page 99
Bookmarking Favorite Pages……Page 101
Viewing Documentation in the Display Pane……Page 103
Bookmarking Pages……Page 104
Evaluating a Selection……Page 105
Viewing Web Pages……Page 106
Preferences for the Help Browser……Page 107
Documentation Location – Specifying the help Directory……Page 108
General – Synchronizing the Contents Pane with the Displayed Page……Page 109
Help Fonts Preferences – Specifying Font Name, Style, and Size……Page 110
Printing the PDF Version of Documentation……Page 112
Using Help Functions……Page 114
Getting Help in the Command Window – the help Function……Page 115
Running Demos……Page 117
Getting Version and License Information……Page 118
Participating in the Newsgroup for MathWorks Products……Page 119
Workspace, Search Path, and File Operations……Page 121
Workspace Browser……Page 123
Viewing and Editing Workspace Variables Using the Array Editor……Page 130
How the Search Path Works……Page 134
Viewing and Setting the Search Path……Page 135
Current Directory Browser……Page 140
Viewing and Making Changes to Directories……Page 142
Creating, Renaming, Copying, and Removing Directories and Files……Page 143
Opening, Running, and Viewing the Content of Files……Page 146
Finding and Replacing Content Within Files……Page 148
Preferences for the Current Directory Browser……Page 150
Importing and Exporting Data……Page 153
Using the Import Wizard with Text Data……Page 156
Using Import Functions with Text Data……Page 161
Importing Numeric Text Data……Page 163
Importing Delimited ASCII Data Files……Page 164
Importing Numeric Data with Text Headers……Page 165
Importing Mixed Alphabetic and Numeric Data……Page 166
Exporting ASCII Data……Page 168
Exporting Delimited ASCII Data Files……Page 169
Using the diary Command to Export Data……Page 170
Using the Import Wizard with Binary Data Files……Page 172
Using Import Functions with Binary Data……Page 174
Exporting Binary Data……Page 177
Exporting MATLAB Graphs in AVI Format……Page 179
Working with HDF Data……Page 181
Overview of MATLAB HDF Support……Page 182
MATLAB HDF Function Calling Conventions……Page 183
Importing HDF Data into the MATLAB Workspace……Page 185
Exporting MATLAB Data in an HDF File……Page 193
Including Metadata in an HDF File……Page 199
Using the MATLAB HDF Utility API……Page 201
Using Low-Level File I/O Functions……Page 203
Opening Files……Page 204
Reading Binary Data……Page 206
Writing Binary Data……Page 207
Controlling Position in a File……Page 208
Reading Strings Line-By-Line from Text Files……Page 210
Reading Formatted ASCII Data……Page 211
Writing Formatted Text Files……Page 213
Closing a File……Page 214
Editing and Debugging M-Files……Page 215
Starting the Editor/Debugger……Page 217
Creating a New M-File in the Editor/Debugger……Page 218
Opening Existing M-Files in the Editor/Debugger……Page 219
Closing the Editor/Debugger……Page 220
Appearance of an M-File……Page 222
Navigating in an M-File……Page 225
Running M-Files from the Editor/Debugger……Page 229
Closing M-Files……Page 230
Finding Errors……Page 231
Debugging Example – The Collatz Problem……Page 232
Using Debugging Features……Page 236
Preferences for the Editor/Debugger……Page 249
General Preferences for the Editor/Debugger……Page 250
Font & Colors Preferences for the Editor/Debugger……Page 251
Display Preferences for the Editor/Debugger……Page 252
Keyboard and Indenting Preferences for the Editor/ Debugger……Page 254
Printing Preferences for the Editor/Debugger……Page 256
Improving M-File Performance – the Profiler……Page 259
What Is Profiling?……Page 261
The profile Function……Page 262
An Example Using the Profiler……Page 264
Viewing Profile Reports……Page 265
Profile Plot……Page 270
Saving Profile Reports……Page 271
Interfacing with Source Control Systems……Page 275
Process of Interfacing to an SCS……Page 277
Viewing or Selecting the Source Control System……Page 278
Function Alternative for Viewing the SCS……Page 279
For ClearCase on UNIX Only – Set a View and Check Out a Directory……Page 280
Checking Files into the Source Control System……Page 281
Function Alternative for Checking In Files……Page 282
Checking Files Out of the SCS……Page 283
Undoing the Check-Out……Page 284
Using Notebook……Page 287
Creating an M-Book……Page 289
Protecting the Integrity of Your Workspace……Page 292
Ensuring Data Consistency……Page 293
Defining Cell Groups……Page 294
Defining Calc Zones……Page 296
Converting an Input Cell to Text……Page 297
Evaluating MATLAB Commands……Page 298
Evaluating Cell Groups……Page 299
Evaluating a Calc Zone……Page 300
Using a Loop to Evaluate Input Cells Repeatedly……Page 301
Converting Output Cells to Text……Page 302
Deleting Output Cells……Page 303
Modifying Styles in the M-Book Template……Page 304
Choosing Loose or Compact Format……Page 305
Controlling Graphic Output……Page 306
Configuring Notebook……Page 310
Define Autoinit Cell Command……Page 312
Define Input Cell Command……Page 313
Evaluate Cell Command……Page 314
Evaluate Loop Command……Page 315
Group Cells Command……Page 316
Toggle Graph Output for Cell Command……Page 317
Ungroup Cells Command……Page 318
Mathematics……Page 321
Matrices and Linear Algebra……Page 323
Function Summary……Page 325
Creation……Page 327
Vector Productsand Transpose……Page 329
Matrix Multiplication……Page 331
The Kronecker Tensor Product……Page 333
Vector and Matrix Norms……Page 334
Overview……Page 335
Overdetermined Systems……Page 337
Underdetermined Systems……Page 340
Overview……Page 343
Pseudoinverses……Page 344
Cholesky Factorization……Page 347
LU Factorization……Page 348
QR Factorization……Page 350
Matrix Powers and Exponentials……Page 354
Eigenvalues……Page 357
Singular Value Decomposition……Page 361
Polynomials and Interpolation……Page 363
Polynomial Function Summary……Page 365
Polynomial Roots……Page 366
Polynomial Evaluation……Page 367
Polynomial Derivatives……Page 368
Polynomial Curve Fitting……Page 369
Partial Fraction Expansion……Page 370
Interpolation Function Summary……Page 372
One-Dimensional Interpolation……Page 373
Two-Dimensional Interpolation……Page 375
Comparing Interpolation Methods……Page 376
Interpolation and Multidimensional Arrays……Page 378
Triangulation and Interpolation of Scattered Data……Page 381
Tessellation and Interpolation of Scattered Data in Higher Dimensions……Page 389
Selected Bibliography……Page 400
Data Analysis and Statistics……Page 401
Column-Oriented Data Sets……Page 404
Function Summary……Page 408
Covariance and Correlation Coefficients……Page 411
Finite Differences……Page 412
Missing Values……Page 414
Removing Outliers……Page 415
Regression and Curve Fitting……Page 417
Polynomial Regression……Page 418
Linear-in-the-Parameters Regression……Page 419
Multiple Regression……Page 421
Polynomial Fit……Page 422
Analyzing Residuals……Page 424
Exponential Fit……Page 427
Error Bounds……Page 430
The Basic Fitting Interface……Page 431
Difference Equations and Filtering……Page 440
Function Summary……Page 443
Introduction……Page 444
Magnitude and Phase of Transformed Data……Page 449
FFT Length Versus Speed……Page 450
Function Functions……Page 451
Function Summary……Page 453
Representing Functions in MATLAB……Page 454
Plotting Mathematical Functions……Page 456
Minimizing Functions of One Variable……Page 459
Minimizing Functions of Several Variables……Page 460
Setting Minimization Options……Page 461
Finding Zeros of Functions……Page 462
Troubleshooting……Page 465
Converting Your Optimization Code to MATLAB Version 5 Syntax……Page 466
Example: Computing the Length of a Curve……Page 469
Example: Double Integration……Page 470
Differential Equations……Page 473
ODE Function Summary……Page 475
Initial Value Problem Solvers……Page 478
Representing ODE Problems……Page 482
Improving ODE Solver Performance……Page 488
Examples: Applying the ODE Initial Value Problem Solvers……Page 503
Questions and Answers, and Troubleshooting……Page 522
BVP Function Summary……Page 529
Introduction to Boundary Value ODE Problems……Page 531
Boundary Value Problem Solver……Page 532
Representing BVP Problems……Page 535
Using Continuation to Make a Good Initial Guess……Page 540
Improving BVP Solver Performance……Page 547
PDE Function Summary……Page 554
Introduction to PDE Problems……Page 555
MATLAB Partial Differential Equation Solver……Page 556
Representing PDE Problems……Page 560
Improving PDE Solver Performance……Page 565
Example: Electrodynamics Problem……Page 566
Selected Bibliography……Page 571
Sparse Matrices……Page 573
Function Summary……Page 575
Sparse Matrix Storage……Page 578
Creating Sparse Matrices……Page 579
Importing Sparse Matrices from Outside MATLAB……Page 584
Information About Nonzero Elements……Page 585
Viewing Sparse Matrices Graphically……Page 587
The find Function and Sparse Matrices……Page 588
Introduction to Adjacency Matrices……Page 589
The Bucky Ball……Page 590
An Airflow Model……Page 595
Standard Mathematical Operations……Page 597
Permutation and Reordering……Page 598
Factorization……Page 602
Simultaneous Linear Equations……Page 608
Eigenvalues and Singular Values……Page 611
Selected Bibliography……Page 614
Programming and Data Types……Page 615
M-File Programming……Page 617
Kinds of M-Files……Page 619
Providing Help for Your Programs……Page 620
Creating M-Files: Accessing Text Editors……Page 621
Simple Script Example……Page 623
Simple Function Example……Page 624
Basic Parts of a Function M-File……Page 625
Function Names……Page 627
How Functions Work……Page 628
Checking the Number of Function Arguments……Page 630
Passing Variable Numbers of Arguments……Page 632
Local and Global Variables……Page 635
Persistent Variables……Page 636
Special Values……Page 637
Data Types……Page 638
Keywords……Page 641
Arithmetic Operators……Page 642
Relational Operators……Page 644
Logical Operators……Page 645
Operator Precedence……Page 648
if, else, and elseif……Page 651
switch……Page 653
while……Page 655
for……Page 656
break……Page 657
return……Page 658
Subfunctions……Page 659
Private Functions……Page 661
Subscripting……Page 662
Advanced Indexing……Page 667
feval……Page 670
Command/Function Duality……Page 672
Operating on an Empty Matrix……Page 673
Using Empty Matrices with If or While……Page 674
Error Handling with eval and lasterr……Page 675
Displaying Error and Warning Messages……Page 676
Date Formats……Page 678
Current Date and Time……Page 683
Pausing During Execution……Page 685
Shell Escape Functions……Page 686
Vectorizing Loops……Page 687
Preallocating Arrays……Page 689
Making Efficient Use of Memory……Page 690
Character Arrays (Strings)……Page 695
Creating Character Arrays……Page 699
Creating Two-Dimensional Character Arrays……Page 700
Converting Characters to Numeric Values……Page 701
Converting to a Cell Array of Strings……Page 702
Comparing Strings For Equality……Page 704
Comparing for Equality Using Operators……Page 705
Categorizing Characters Within a String……Page 706
Searching and Replacing……Page 707
String/Numeric Conversion……Page 709
Array/String Conversion……Page 710
Multidimensional Arrays……Page 711
Multidimensional Arrays……Page 713
Creating Multidimensional Arrays……Page 714
Accessing Multidimensional Array Properties……Page 718
Indexing……Page 719
Reshaping……Page 720
Permuting Array Dimensions……Page 722
Operating Element-by-Element……Page 724
Operating on Planes and Matrices……Page 725
Organizing Data in Multidimensional Arrays……Page 726
Multidimensional Cell Arrays……Page 728
Multidimensional Structure Arrays……Page 729
Applying Functions to Multidimensional Structure Arrays……Page 730
Structures and Cell Arrays……Page 731
Structures……Page 734
Building Structure Arrays……Page 735
Accessing Data in Structure Arrays……Page 737
Applying Functions and Operators……Page 740
Writing Functions to Operate on Structures……Page 741
Organizing Data in Structure Arrays……Page 742
Nesting Structures……Page 747
Cell Arrays……Page 749
Creating Cell Arrays……Page 750
Obtaining Data from Cell Arrays……Page 753
Deleting Cells……Page 754
Replacing Lists of Variables with Cell Arrays……Page 755
Organizing Data in Cell Arrays……Page 757
Nesting Cell Arrays……Page 759
Converting Between Cell and Numeric Arrays……Page 760
Cell Arrays of Structures……Page 761
Function Handles……Page 763
Benefits of Using Function Handles……Page 765
A Simple Function Handle……Page 767
Maximum Length of a Function Name……Page 769
Function Evaluation and Overloading……Page 771
Examples of Function Handle Evaluation……Page 772
Displaying Function Handle Information……Page 775
Fields Returned by the Functions Command……Page 776
Types of Function Handles……Page 779
Converting Function Handles to Function Names……Page 783
Converting Function Names to Function Handles……Page 784
Testing for Equality……Page 785
Saving and Loading Function Handles……Page 787
Including Path In the Function Handle Constructor……Page 788
Evaluating a Nonscalar Function Handle……Page 789
Historical Note – Evaluating Function Names……Page 790
MATLAB Classes and Objects……Page 791
Features of Object-Oriented Programming……Page 793
Creating Objects……Page 794
Invoking Methods on Objects……Page 795
Debugging Class Methods……Page 796
Setting Up Class Directories……Page 797
Tips for C++ and Java Programmers……Page 798
The MATLAB Canonical Class……Page 799
The Class Constructor Method……Page 800
Identifying Objects Outside the Class Directory……Page 801
The display Method……Page 802
The set and get Methods……Page 803
Handling Subscripted Reference……Page 804
Object Indexing Within Methods……Page 807
Defining end Indexing for an Object……Page 808
Indexing an Object with Another Object……Page 809
Converter Methods……Page 810
Overloading Operators……Page 811
Overloading Functions……Page 813
The Polynom Constructor Method……Page 814
Converter Methods for the Polynom Class……Page 815
The Polynom subsref Method……Page 818
Overloading Arithmetic Operators for polynom……Page 819
Overloading Functions for the Polynom Class……Page 821
Listing Class Methods……Page 823
Simple Inheritance……Page 825
Multiple Inheritance……Page 826
Aggregation……Page 827
Inheritance Model for the Asset Class……Page 828
The Asset Constructor Method……Page 829
The Asset set Method……Page 831
The Asset subsref Method……Page 832
The Asset subsasgn Method……Page 833
The Asset display Method……Page 834
Designing the Stock Class……Page 835
The Stock Constructor Method……Page 836
The Stock set Method……Page 838
The Stock subsref Method……Page 839
The Stock subsasgn Method……Page 841
The Stock display Method……Page 842
Designing the Portfolio Class……Page 844
The Portfolio Constructor Method……Page 845
The Portfolio display Method……Page 846
The Portfolio pie3 Method……Page 847
Creating a Portfolio……Page 848
Modifying Objects During Save or Load……Page 850
Summary of Code Changes……Page 851
The loadobj Method……Page 852
Changing the Portfolio Constructor……Page 853
The Portfolio subsref Method……Page 854
Object Precedence……Page 855
Specifying Precedence of User-Defined Classes……Page 856
Selecting a Method……Page 857
Querying Which Method MATLAB Will Call……Page 860
External Interfaces and the MATLAB API……Page 861
Finding the Documentation in Online Help……Page 862
Reference Documentation……Page 864
Index……Page 867

Reviews

There are no reviews yet.

Be the first to review “MatLAB 6 0 Using”
Shopping Cart
Scroll to Top