<- Back to Main
Assignment 04 - DUE Friday, March 14th
Reading Assignment:
Histogram Tutorial
Array Concatenation - Needed for this homework!
Histograms Pt. 2
Introduction
Number 1 has to do with finding the minimum difference between a number and an array of numbers. Remember to use array functions as much as possible!
Number 2 is awesome!! Numerical Integration. Don't you remember doing to Reimann Sum in beginning calculus to estimate a definite integral?? You had to do it by hand and it was stupid! Now you get to use a computer to do the same thing (sorta). Take that, math teacher!
Disregard what the problem says about not using loops. Use loops to get a proper value for the trapezoidal rule sum, based on what we talked about in class. In each iteration of your loop, sum the area for one of your slices, and add it to a sum for the function's total area.
The Assignment:
Do numbers 1 and 2 on the page linked below.
Click here for worksheet: hw3.html
HINTS:
For #2: Use WHERE(), MIN(), and ABS(). Look em up! Type ?where for example, at the IDL prompt.
For #3: Remember Reimann! Read the background material linked on the worksheet!
Update: Paul Higgins - January 24, 2007 - UG Astro, Department of Astronomy, University of California at Berkeley