![]() |
| | #1 |
| Registered User Join Date: Nov 2009
Posts: 4
| Beginner Needs Help (Least Squares Analysis Thanks a lot. |
| kd001 is offline | |
| | #2 |
| Jack of many languages Join Date: Nov 2007 Location: Katy, Texas
Posts: 2,070
| I don't see any structure or mechanical errors with the code. Must be a formula issue.
__________________ Mac and Windows cross platform programmer. Ruby lover. |
| Dino is offline | |
| | #3 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,809
| I don't see any formula issues compared to Linear least squares - Wikipedia, the free encyclopedia either at first glance. First thing I would check, you're using "log", which computes ln. If you want to compute log, you need to use "log10". |
| tabstop is offline | |
| | #4 |
| Registered User Join Date: Sep 2008 Location: Toronto, Canada
Posts: 521
| You are not using the array logv[], but are assigning the logarithm of v[] into y[]... So maybe it has something to do with that. Formula/correct variable issue. |
| nonoob is offline | |
| | #5 |
| Registered User Join Date: Nov 2009
Posts: 4
| These are the formulae. For some reason the program is not doing that: Last edited by kd001; 11-03-2009 at 04:37 PM. |
| kd001 is offline | |
| | #6 |
| Registered User Join Date: Nov 2009
Posts: 4
| 'tabstop' may be onto something. I should calculate log10velocity so when I get the chance I will try changing it to log10. |
| kd001 is offline | |
| | #7 |
| Senior software engineer Join Date: Mar 2007 Location: Portland, OR
Posts: 5,761
| That's a strange definition of "works."
__________________ "Congratulations on your purchase. To begin using your quantum computer, set the power switch to both off and on simultaneously." -- raftpeople@slashdot |
| brewbuck is offline | |
| | #8 |
| Registered User Join Date: Nov 2009
Posts: 4
| |
| kd001 is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Generating an image of squares? | vopo | C# Programming | 3 | 10-21-2008 10:15 AM |
| Same old beginner question... | Sharmz | C Programming | 15 | 08-04-2008 11:48 AM |
| Forced moves trouble!! | Zishaan | Game Programming | 0 | 03-27-2007 06:57 PM |
| Dev-C++ Profile Analysis | Orborde | C++ Programming | 0 | 05-28-2005 01:37 AM |
| rhetorical analysis and why it is for YOU! | doubleanti | A Brief History of Cprogramming.com | 2 | 03-30-2003 02:11 PM |