Thread: Least Squared Error Function

  1. #1
    Banned
    Join Date
    Jul 2010
    Posts
    8

    Least Squared Error Function

    Hello,
    Any one know how to code up a simple function to find the Least Squared Error for an array if values. Have looked at math and seems really complex.
    Say:

    Code:
    double ReturnLeastSquaredError( int Items, double Data[] )
    {
    ??????????????
    }
    Many thanks

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You have to give an attempt first and ask specific questions.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Banned
    Join Date
    Jul 2010
    Posts
    8
    Quote Originally Posted by Elysia View Post
    You have to give an attempt first and ask specific questions.
    Its replies like that that really move the world along

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    No, seriously, it's part of the homework policy. And we cannot even begin to imagine what problem you're having if you aren't specific. Plus we don't want to write everything for you.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Banned
    Join Date
    Jul 2010
    Posts
    8
    Quote Originally Posted by Elysia View Post
    No, seriously, it's part of the homework policy. And we cannot even begin to imagine what problem you're having if you aren't specific. Plus we don't want to write everything for you.
    Mmmm.

    Not home work just stuck on this one…
    So seems as this forum is no value to me and I have year of c/c++ and could have help other but am just buried in the project and need a little help.
    Have ask for user id to be removed.

  6. #6
    Banned
    Join Date
    Jul 2010
    Posts
    8
    Quote Originally Posted by Elysia View Post
    No, seriously, it's part of the homework policy. And we cannot even begin to imagine what problem you're having if you aren't specific. Plus we don't want to write everything for you.

    How do you remove my user id please?

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    What if you just asked a specific question: what are you confused about?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    Banned
    Join Date
    Jul 2010
    Posts
    8
    Quote Originally Posted by Elysia View Post
    What if you just asked a specific question: what are you confused about?
    How do you remove my user id please?

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Try looking up "least squares error" on google, and do some basic research yourself.

    Sure we could do that for you, but you won't learn anything at all. Further, you won't understand what we give you and that will just beg more questions from you.

    If you can't even demonstrate that you've even done the most basic of research, then just give up as a programmer.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Banned
    Join Date
    Jul 2010
    Posts
    8
    Quote Originally Posted by Salem View Post
    Try looking up "least squares error" on google, and do some basic research yourself.

    Sure we could do that for you, but you won't learn anything at all. Further, you won't understand what we give you and that will just beg more questions from you.

    If you can't even demonstrate that you've even done the most basic of research, then just give up as a programmer.
    I guess the big issue is here that most of these web forum are over run with the unemployable that have nothing better to do or children that just like to post.
    I am neither.. Up to my eyes in work and needed little simple help.

    I post when I can make a contribution, other wish I stay of the tread.

    I ask for the second time… How do I get my user id removed please?

    Another pointless forum

  11. #11
    Registered User
    Join Date
    Jun 2010
    Posts
    10
    someone who's just not grateful for the help he gets, even in a little forum like this. How do we avoid people like this?

  12. #12
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    We ignore them.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  13. #13
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Well, I have decided to satisfy PartOfTheSoluti's deepest and darkest desires.

    *thread closed*
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Outputting a list of squared Doubles
    By dnguyen1022 in forum C++ Programming
    Replies: 13
    Last Post: 01-19-2009, 01:24 PM
  2. Help with outputting a list of squared numbers
    By dnguyen1022 in forum C++ Programming
    Replies: 28
    Last Post: 01-19-2009, 09:06 AM
  3. newbie question - sin squared
    By midiman in forum C++ Programming
    Replies: 11
    Last Post: 09-29-2005, 01:03 AM
  4. The sum of squared digits
    By wiz23 in forum C++ Programming
    Replies: 4
    Last Post: 04-10-2005, 09:05 AM
  5. How do I base size of arrays on annother number?
    By Dual-Catfish in forum C++ Programming
    Replies: 15
    Last Post: 09-25-2001, 01:31 PM