Thread: converting function to include vectors

  1. #16
    Registered User
    Join Date
    Apr 2008
    Posts
    204
    Yeah its there, nine lines down. but im still getting math errors and its definately on the line:
    x_coeff = (exp(x[0]*2*pi)-cosh(x[0]*x[1]*Actual_Output[0]))/sinh(x[0]*x[1]*Actual_Output[0]);

    however i got it to print each bit to screen and it does have each variable so i am a little confused

  2. #17
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So what are x[0] and x[1] and Actual_Output[0] going in and what is x_coeff coming out? Do you #define pi somewhere? Make sure you didn't put a ; at the end of that line.

  3. #18
    Registered User
    Join Date
    Apr 2008
    Posts
    204
    The problem i have finally found is that the estimations of x[0] and x[1] that are being improved with every call of rosen, are not getting sent to rosen as the latest x's but always the original x estimations. Therefore each time it calculates everything it is just a repeat of the last time.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problems with stl vectors function push_back
    By _lazycat_ in forum C++ Programming
    Replies: 10
    Last Post: 06-05-2009, 02:53 PM
  2. Include some function form library
    By thepolo in forum C Programming
    Replies: 4
    Last Post: 05-24-2009, 05:11 PM
  3. Vectors of pointers and function templates
    By 7words in forum C++ Programming
    Replies: 3
    Last Post: 05-02-2004, 11:39 AM
  4. Converting byte arrays to vectors
    By kasun in forum C++ Programming
    Replies: 3
    Last Post: 03-02-2004, 10:31 AM
  5. ternary operator(?), vectors, and recursive function
    By kes103 in forum C++ Programming
    Replies: 2
    Last Post: 02-02-2003, 03:19 PM

Tags for this Thread