Week 2_ProgrammingAssignment_Exercise6

I have written the code correctly, and I am getting the correct expected value, but still, it is giving an error. I have attached the screenshots below

{moderator edit - solution code removed}


Please note that epsilon is not in the square root.

Right! The order of operations is always crucial. \epsilon is in the denominator, but not under the square root in the math formula.

Also note that you need to look more closely at your answers. They are not the same: an error in the 4th or 5th decimal place is not just a rounding error. We are dealing with 64 bit floating point here, so rounding errors are on the order of 10^{-15} or smaller. E.g. look at W1[0,1]: your value differs in the second decimal place from the expected value.