Search:

Type: Posts; User: strokebow

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    795

    Advice Grid Collection of Data

    Hi guys,

    I have a program which generates lots of data points in 2D (x and y co-ordinates). Perhaps 1,000,000+ of these points. These are floating point numbers. The values all fall within a...
  2. Replies
    5
    Views
    1,103

    Do you have a code example for read n bytes and...

    Do you have a code example for read n bytes and only use the last one please?

    thanks
  3. Replies
    5
    Views
    1,103

    fread every nth character

    Hi,

    I'm a little rusty.

    I am currently reading several values one after another from a file like so:



    ifstream f;
    double x;
  4. Replies
    8
    Views
    932

    Thanks for your questions. Its helping me to...

    Thanks for your questions. Its helping me to properly form the problem.

    The range is variable. between -circle radius and + circle radius.

    How do you mean integral?

    I want the grid size to...
  5. Replies
    8
    Views
    932

    So, the (x, y) data refers to a position in a...

    So, the (x, y) data refers to a position in a circle.
    I need to make the data meaningful. By that I want to know where these x,y points are situated on the circle, how they are distributed. In...
  6. Replies
    8
    Views
    932

    I am still thinking about the method. When i rush...

    I am still thinking about the method. When i rush these seemingly simple tasks it often ends up with poor hard coding. I am still considering the best method.

    I think post processing is what I...
  7. Replies
    8
    Views
    932

    I suppose another way to do this would be...

    I suppose another way to do this would be afterwards.

    In real time would be nice. However, post processing wouldn't be so bad.

    i.e.) If I had ~500,000 x and y values between -range and +...
  8. Replies
    8
    Views
    932

    Grid Reference Problem

    Hi,

    I need some ideas/advice on how to code the following:

    I have two random numbers which are generated and are related to each other (representing x and y co-ordinate). These random numbers...
  9. Replies
    2
    Views
    1,063

    String - spaced out words

    Hi,

    I have a few lines of text, looks something like:



    I want to make this in to a CSV.
  10. Replies
    5
    Views
    1,006

    Thanks both for the help!

    Thanks both for the help!
  11. Replies
    5
    Views
    1,006

    All doubles. Oh I see. So what is the best way...

    All doubles.

    Oh I see. So what is the best way to perform (1/6):


    static_cast<double>(1/6)?
  12. Replies
    5
    Views
    1,006

    factoring - baffled

    Any ideas why these 2 expressions (as far as I can see = exactly the same), give vastly different results:


    Y = Y + (T/6)*(2*V + 2*P + 2*P + T*S);
    I make the following change (introduce T in to...
  13. Replies
    10
    Views
    1,072

    Furthermore, How would I do this in the...

    Furthermore,

    How would I do this in the fastest possible way to also take account of negative values.

    i.e. the maximum value irrespective of sign.

    Would it be just a case of:


    xMax =...
  14. Replies
    10
    Views
    1,072

    Thanks!! So basically, just keep a variable...

    Thanks!!

    So basically, just keep a variable for the max.

    I suppose its quicker to just do:

    xMax = (X > xMax)?X:xMax;
    yMax = (Y > yMax)?Y:yMax;

    Whereby, if X is greater than xMax...
  15. Replies
    10
    Views
    1,072

    Thanks to both! This parameter is relating to...

    Thanks to both!

    This parameter is relating to maximum position of a body (from a given reference) which is constantly being updated due to other equations being iterated which determine the bodies...
  16. Replies
    10
    Views
    1,072

    Finding maximum value of dynamic parameter

    Hi,

    Could do with some advice here...

    My Aim/Motivation:
    I have a parameter which is constantly updated throughout the code. I want to find the value for this parameter at its maximum.


    I...
  17. Replies
    26
    Views
    8,040

    Points taken :-) Hey, thanks to everyone. ...

    Points taken :-)

    Hey, thanks to everyone.

    Got it sorted. Works nicely. Ended up implementing as Jim suggested. Cheers Jim!!!!
  18. Replies
    26
    Views
    8,040

    Also, is it really necessary to open the ifstream...

    Also, is it really necessary to open the ifstream file?

    Couldn't I just store the data in to memory?
  19. Replies
    26
    Views
    8,040

    Cheers Jim. I'll give that a go now! Thanks...

    Cheers Jim. I'll give that a go now!

    Thanks also laserlight for the heads up
  20. Replies
    26
    Views
    8,040

    Thanks for reply. Ok, so I use ios::ate instead...

    Thanks for reply.
    Ok, so I use ios::ate instead of ios::out

    But I am not sure how that will allow me to truncate the file?
  21. Replies
    26
    Views
    8,040

    Thanks very much laserlight I like this idea...

    Thanks very much laserlight

    I like this idea of truncating the file. How would I go about that?

    thanks
  22. Replies
    26
    Views
    8,040

    Thanks for suggestions!! Okay, so how about...

    Thanks for suggestions!!

    Okay, so how about this:

    - I copy the file content in to memory (up until the line that I specify).
    - Delete the file (can i do this independent of platform?)
    - open...
  23. Replies
    26
    Views
    8,040

    Hi thanks, Basically this is what I have....

    Hi thanks,

    Basically this is what I have. Note: f is declared as fstream




    f.open(Name_v, ios::binary|ios::in|ios::out);
    long int posl;
  24. Replies
    26
    Views
    8,040

    Thanks again for replies and advice; it is much...

    Thanks again for replies and advice; it is much appreciated!

    It seems as if the close function just won't do for me... because it is likely that the program will be closed in a proper manner and...
  25. Replies
    26
    Views
    8,040

    Thanks both for the advice and help! I need to...

    Thanks both for the advice and help!

    I need to re-think my approach: Is there no way to save your files in c++? If I could 'save' them periodically then that would suffice and in the event of a...
Results 1 to 25 of 225
Page 1 of 9 1 2 3 4