Syllabus for CS A321: Computing Tools for Scientific Research
Purpose:
This course provides some basic programming capabilities for
students in the natural sciences. It is tool and skill oriented, and intended
to be sufficient for creating short computer programs and using software
produced by other scientists. The primary language is Matlab, a
"fifth generation" programming framework that supports scripting, graphics
and plotting, and provides a "glue" for accessing and using software
written in other languages (C, C++, Java, Fortran). Matlab is valued
because it provides a rapid prototying environment for quickly and easily
testing out new ideas.
C/C++ is also covered, but primarily how to connect from Matlab to an
existing program written in C/C++. The same ideas and general methods
apply to Fortran and Java for this linkage.
The course does not emphasize object
oriented programming, software design methodology, or higher level design
patterns and data structures. Students needing those capabilities are
probably better off taking some of the A-courses in the Computer Science
Department.
Grading:
The necessary skills define the grading schema:
- F: no skills needed
- D: The ability to access (read and/or write) data in files into/from
Matlab and appropriately plot and graph results.
Basic knowledge and use of data represented as vectors and matrices.
- C: All in D, plus writing and documenting functions in Matlab.
Basic programming control structures
(for, while, case), use of simple data structures,
and combining multi-file programs to create an executable
program. The key distinction between a computer address and the data
stored at that address.
- B: All in C, plus basic data analysis and statistics on data.
This is not a course on the mathematical foundations of stats, and
will just cover how to computationally perform common statistical
functions to some given data.
Use of toolboxes (Matlab) and other libraries.
Character and string manipulation. Debugging and advanced use of
files.
- A: All in B, plus performance engineering, object-oriented ideas,
and interfacing Matlab with C or C++. Advanced plotting and
graphics, and use of API's for accessing instruments and other data
sources.
These skills need to be demonstrated via a sequence of
coding and analysis projects.
Textbooks
No textbook is required. If you want supplementary material most of it is
online. But if you intend to keep using Matlab it would be
worth the money to get the first book listed.
Everything needed will be in online or through Matlab's
help, lookfor, and other commands.
The books listed are intended to be long-term reference works that can
be useful even after the course is over. The course will not cover
all of the material in them. You can get along just dandy without any of
them, and then when you graduate make your employer buy them for you.
- Mastering Matlab, Hanselman and Littlefield. A comprehensive
reference work for Matlab, and even those from versions 5 and 6 are
still useful (Matlab is up to ver. 7 now).
- Matlab Guide, Desmond Higham and Nicholas Higham. This is more
of a follow-along text, but assumes more math knowledge than
A321/A521 does.
- Practical C Programming, Steve Oualline. An easily read
introduction to C.
- C++ How to Program , Dietel and Dietel. This is more of a
reference work - nobody could get through this in a single semester.
Outline of Material
Some flexibility will
be exercised depending on the students taking it. So the following outline
is not contractual, but instead meant to give a rough idea of what will be
covered. The timing of when material is presented may also be shifted
depending on questions/needs from the students.
-
Week 1
-
Matlab basics:
Starting and stopping matlab, the windows it provides;
Interactive use as a calculator; Variables;
Scripting and help facilities (especially
whos, what, which, lookfor); ;
Case sensitivity, save, load, diary.
-
Motivating example(s) (elementary least squares, fitting a line
to a set of experimental data)
-
Week 2
-
Vectors and matrices:
Ideas behind vectors (geometric and from examples) and matrices;
Range notation (colon operator);
Basic plotting, graphing, visualization.
-
Control structures and ideas:
If tests and relational operators,
for and while loops, empty ranges.
-
Week 3
-
Using vectors and matrices in control and graphing
-
More/better plotting, graphing, visualization;
Documenting code.
-
Week 4
-
Functions (versus scripts) and design issues.
-
Week 5
-
Basic data analysis: mean, std deviation, variances. Plotting
error bars and using legends.
-
Built-in functions and toolboxes.
-
Week 6
-
More detailed Data input and output to/from files;
Formatting output.
-
Matlab general catch-up and review
-
Week 7
-
Timings on a computer;
-
Performance analysis, bottleneck identification.
Some Matlab-specific tools for performance engineering.
-
Week 8
-
Data types and memory allocation in Matlab with foreshadowing of
of linking it to C or Fortran later on.
-
Weird cases: NaN, empty matrices, complex numbers.
-
Week 9
-
Character and string manipulations;
Output formatting.
-
Week 10
-
Critical distinction of call by address or
reference, call by copying.
-
Passing functions as arguments in Matlab
-
Week 11
-
Survey of existing standard libraries;
Matlab toolboxes compared to other language libraries.
-
Simple data structures (linked list, queue, maybe a stack).
-
Week 12
-
Intermediate debugging.
Pointers and memory allocation follies in C/C++ and Fortran.
- Advanced debugging,
-
Week 13
-
Simple data structures
-
Combining the two: the mex interface and Matlab engine.
Changes to this page:
- Initialized, Thu Nov 2 08:54:44 EST 2006
- Updated: Mon Jan 7 11:33:32 EST 2008