converting function to include vectors

This is a discussion on converting function to include vectors within the C Programming forums, part of the General Programming Boards category; Yeah its there, nine lines down. but im still getting math errors and its definately on the line: x_coeff = ...

  1. #16
    Registered User
    Join Date
    Apr 2008
    Posts
    190
    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,185
    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
    190
    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.

Page 2 of 2 FirstFirst 12
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, 03:53 PM
  2. Include some function form library
    By thepolo in forum C Programming
    Replies: 4
    Last Post: 05-24-2009, 06:11 PM
  3. Vectors of pointers and function templates
    By 7words in forum C++ Programming
    Replies: 3
    Last Post: 05-02-2004, 12:39 PM
  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


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