Introduction to Programming
Note: While inclusion of all components in this chapter would, in principle, be possible, selection of one or two of C, FORTRAN, IDL, and MATLAB would probably be more common.
7.1 | Components of a Programming Language | |
7.1.1 Variables, Variable Names, and Use of Memory | ||
7.1.2 Essential Action Statements | ||
7.1.3 Logical Expressions and Conditions | ||
7.1.4 Syntactic Wrinkles | ||
7.1.5 Essential Control Structures | ||
7.2 | Sample Short Algorithms | |
7.3 | Two Algorithms | |
7.3.1 Solving Laplace's Equation | ||
7.3.2 Creating and Storing Arrays | ||
7.4 | Solving Laplace's Equation with FORTRAN | |
7.5 | Additional Features of FORTRAN | |
7.5.1 Multi-Way Selection | ||
7.5.2 Reading Data from Keyboard | ||
7.5.3 Additional Loops | ||
7.5.4 Subroutines, Functions, and Common Storage | ||
7.6 | Solving Laplace's Equation with C | |
7.7 | Additional Features of C | |
7.7.1 Multi-Way Selection | ||
7.7.2 Reading Data from Keyboard | ||
7.7.3 Additional Loops | ||
7.7.4 Functions and Global Variables | ||
7.8 | Solving Laplace's Equation with IDL | |
7.9 | Solving Laplace's Equation with MATLAB | |
7.10 | Creating and Storing Two-Dimensional Scalar Arrays | |
7.10.1 ... with FORTRAN | ||
7.10.2 ... with C | ||
7.10.3 ... with IDL | ||
7.10.4 ... with MATLAB | ||
7.11 | Creating and Storing Three-Dimensional Scalar Arrays | |
7.11.1 ... with FORTRAN | ||
7.11.2 ... with C | ||
7.11.3 ... with IDL | ||
7.11.4 ... with MATLAB | ||
7.12 | Creating and Storing Two-Dimensional Vector Arrays | |
7.12.1 ... with FORTRAN | ||
7.12.2 ... with C | ||
7.12.3 ... with IDL | ||
7.12.4 ... with MATLAB | ||
7.13 | Creating and Storing Three-Dimensional Vector Arrays | |
7.13.1 ... with FORTRAN | ||
7.13.2 ... with C | ||
7.13.3 ... with IDL | ||
7.13.4 ... with MATLAB | ||
7.14 | Reading Files | |
7.14.1 ... with FORTRAN | ||
7.14.2 ... with C | ||
7.14.3 ... with IDL | ||
7.14.4 ... with MATLAB | ||
7.15 | References | |
7.16 | Exercises | |
7.A | Listing of irrad.f(.for) | |
7.B | Listing of irrad.c | |
7.C | Listing of lugen_list.pro | |
7.D | Listing of lugen_list_event.pro | |
7.E | Listing of lugen_list.m | |
7.F | Listing of pdens.f(.for) | |
7.G | Listing of pdens.c | |
7.H | Listing of wavegd.f(.for) | |
7.I | Listing of wavegd.c | |
7.J | Listing of quadpole.f(.for) | |
7.K | Listing of quadpole.c | |
7.L | Listing of luread_list.pro | |
7.M | Listing of luread_list.m |