Chapter 7

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.1Components 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.2Sample Short Algorithms
7.3Two Algorithms
7.3.1 Solving Laplace's Equation
7.3.2 Creating and Storing Arrays
7.4Solving Laplace's Equation with FORTRAN
7.5Additional 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.6Solving Laplace's Equation with C
7.7Additional 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.8Solving Laplace's Equation with IDL
7.9Solving Laplace's Equation with MATLAB
7.10Creating 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.11Creating 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.12Creating 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.13Creating 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.14Reading Files
7.14.1 ... with FORTRAN
7.14.2 ... with C
7.14.3 ... with IDL
7.14.4 ... with MATLAB
7.15References
7.16Exercises
7.AListing of irrad.f(.for)
7.BListing of irrad.c
7.CListing of lugen_list.pro
7.DListing of lugen_list_event.pro
7.EListing of lugen_list.m
7.FListing of pdens.f(.for)
7.GListing of pdens.c
7.HListing of wavegd.f(.for)
7.IListing of wavegd.c
7.JListing of quadpole.f(.for)
7.KListing of quadpole.c
7.LListing of luread_list.pro
7.MListing of luread_list.m


Return to Brief Table of Contents

Return to Project Home Page