AMSC 661 / CMSC 661 Spring 2010

Frequently Asked Questions for Homework 2

Question: 03-01-2010: What is the due date? How should I submit it?

Answer: This assignment is due at 4:00pm on Monday, March 22, at our first class after Spring Break. Late penalties begin at 4:01. There are two acceptable ways to submit it: (1) Give it to me in the classroom, before class begins. (2) Deliver it to my office, any time prior to when I leave for class on the due date. (Slide it under the door if I am not there.) Do not put it in my mailbox, and do not leave it in my office after I leave for class on the due date. Email submission is acceptable only in "emergencies".

Question: 03-01-2010: What are the point values for the challenges?

Answer: 50 points total.
Program documentation and labeling of plots: 6 points.
Program correctness: 12 points.
Challenge 1 : 6 points for tables and plots and 8 for discussion.
Challenge 2 : 4 points for plots and 6 for discussion.
Challenge 3 : 8 points.

Question: 03-01-2010: What should I submit?

Answer: I grade everyone's Challenge 1, then everyone's 2, etc., to help insure uniformity in grading, so I would really appreciate your help in making this easy.

  • Start each challenge on a new sheet of paper (or a new side of a sheet of paper), and keep them in order, stapled together.
  • Submit a listing of your program for solving Challenge 1 and Challenge 2.
  • For Challenge 1: Submit tables, plots, and discussion.
  • For Challenge 2: Submit plots and discussion.
  • For Challenge 3: Submit your handwritten or typed answer.
  • Grading notes:
  • Partial credit is given for partially-working programs.
  • Sometimes I might ask you to email your program files to me so that I can run them, so don't discard them.
  • Late penalties (see syllabus) are calculated problem-by-problem, so if you are finished with some problems but not all, hand in what you have finished.
  • Question: 03-01-2010: How do I get started?

    Answer: My advice is to study the wavelet demo programs and the transform and wavelet lecture notes on our homepage.

    Question: 03-09-10: When doing the discrete cosine transform and discrete sine transform, should we use the built-in Matlab functions or write our own?

    Answer: Please use the built-in functions.

    Question: 03-09-10: In Challenge 2, should we again use the detrended signal with DST and the original signal with the DCT?

    Answer: Yes.

    Question: 03-09-10: Why use the DST for detrended data and the DCT for the other?

    Answer: Since sin(0)=0, the DST approximation always produces 0 at t=0, so it works better for detrended data.

    Question: 03-10-10: How many levels should we use for the wavelet transforms in Challenges 1 and 2?

    Answer: Sorry I forgot to specify this. Use 4 levels for all of them, just as in waveletsignaldemo.m

    Question: 03-10-10: The waveletsigdemo.m program prints this out: "Also note that A(i,t) = A(i+1,t) + D(i+1,t)." I thought that the things getting displayed are the frame and detail for the function for various values of m. But the notes say something different about the frame and detail: f_m(x) = f_m-1(x) + d_m-1(x) There's an intuitive difference too: The Matlab graphs are more accurate for smaller levels. But I would expect the frame approximations to be better with higher values of m, since the function is estimated over smaller intervals. So does that mean the Matlab "level" is different from the m value? If so, how are they related?

    Answer: The Matlab storage scheme is backwards from the numbering in the Kammler book and the notes I based on the Kammler book. So in the Matlab data structures, you get more detail for the low values of i, while in the Kammler notation, you get more detail for the high values of m.

    Question: 03-11-10: Ok, I think I follow - so we want to look at the 4th level wavelet transform which would be a_4,d_3,d_2,d_1,d_0 - which together have 600 coefficients (for our problem) - and then pick out the largest k of them by magnitude and zero out the rest, then perform the inverse wavelet transforms to get a compressed signal, right?

    Answer: Correct.

    Question: 03-12-10: In problems 1a. and 1b. we are supposed to report the periods of the 5 largest coefficients. Is the period simply the index in the vector?

    Answer: The period depends on the index but is not equal to it. It is the time for a complete oscillation of the cosine function from 0 to positive to 0 to negative and back to 0. Type "doc dct" to see the correspondence between coefficients and cosines of different periods, and similarly for dst.

    Question: 03-13-10: In the first question, we are asked to find the periods of the 5 largest coefficients. Each of these coefficients would be the result of N sine functions. So, if I understand it right, I would have to find the LCM of these N periods to find the period for a particular coefficient. I was wondering if I have understood the question right.

    Answer: No. Look on p.4 of the notes, "Definition of the inverse transform." Note that if you add up the sin functions, weighted by the coefficients computed by the sine transform, you get the original function back again. So each coefficient in the sine transform corresponds to a single-period sin function.

    Question: 03-21-10: It says the data in dsig represents stock prices, so why are there negative values?

    Answer: Sorry. I meant to say "stock returns", not "stock prices".

    Question: 03-??-10:

    Answer: