Least Squared Error Function

This is a discussion on Least Squared Error Function within the C Programming forums, part of the General Programming Boards category; Hello, Any one know how to code up a simple function to find the Least Squared Error for an array ...

  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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  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
    m&m
    m&m is offline
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,614
    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
    21,743
    Well, I have decided to satisfy PartOfTheSoluti's deepest and darkest desires.

    *thread closed*
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    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, 12:24 PM
  2. Help with outputting a list of squared numbers
    By dnguyen1022 in forum C++ Programming
    Replies: 28
    Last Post: 01-19-2009, 08: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21