HW5-3 Graph of my output

Hi,

Here is the graph of my output for HW5-3. I get an error of 0.0313213019648. But the solution check gives me a "Error, at least one of your entries is not correct". Am I right or wrong?

link text

Also, I just noticed that I need >60 karma to upload an image. Why??!!

asked 22 Mar '12, 05:19

Charuvahan's gravatar image

Charuvahan
63126
accept rate: 0%

Can you post your values, not the image that says almost nothing?

Actually, even though I have more karma that needed I can't upload images. So don't worry :)

(22 Mar '12, 07:56) Ftynse-2 Ftynse-2's gravatar image

3 Answers:

Hi,

I finally found the problem. It was the way I was calculating the cost for smoothing(the value that we are trying to minimize). I was dividing the value by the number of data points. I removed that and it worked fine.

My thanks to @ftynse, @dojuba and @fortranista for responding

Charuvahan

link

answered 23 Mar '12, 02:13

Charuvahan's gravatar image

Charuvahan
63126

Well the hard-coded tolerance for the close_enough function is 0.03. As long as you are above that threshold you will get an error, even if it is only order of 0.001. Probably, you need to improve your code. I am still stuck with that, too :)

link

answered 22 Mar '12, 08:13

dojuba-1's gravatar image

dojuba-1
546

Your graph looks about right to me (though I only plotted my answer with ascii art, and I didn't allow for the fact that my character cells aren't square, so I'm only using my gut to compare them.)

For your own information, plot answer1.

Try swapping the order of your updates until you converge on the same solution as answer1.

link

answered 22 Mar '12, 09:11

fortranista's gravatar image

fortranista
25271428

Your answer
Question text:

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×5,186
×69
×33
×27

Asked: 22 Mar '12, 05:19

Seen: 464 times

Last updated: 23 Mar '12, 02:13