Search:

Type: Posts; User: vutek0328

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,395

    Quick question, print to two files

    How do you print to both file.stderr and file.stdout.
    What's the command to do that?


    (./something.exe > file.stderr) >& file.stdout

    ??
  2. Replies
    4
    Views
    804

    So here I'm trying to pass multiple stuff through...

    So here I'm trying to pass multiple stuff through to the function, such as a set of parameters stored in the pointer p, the values of the parameters stored in the pointer paramfile, then some...
  3. Replies
    4
    Views
    804

    calling/passing functions

    I'm trying to call a fuction:


    int DetermineEvent(parameters *p, char *paramfile, double X, double u, double dt, int *left, int *right, int *add)

    from the main file, what would it look like:...
  4. Replies
    4
    Views
    1,045

    hehe, I already started to mess around with the...

    hehe, I already started to mess around with the code so that I can use it, but thanks for the reminder Salem :)

    How many arguments should I pass there? I'm guessing 3: parameter pointer and an...
  5. Replies
    4
    Views
    1,045

    Indeed I did not write this code, and I'm trying...

    Indeed I did not write this code, and I'm trying to decipher and take what I need out of it.

    I have a code with a number of pre-defined parameters, which are all included in the following header...
  6. Replies
    4
    Views
    1,045

    reading file confusion

    int readParameterFile(parameters *p, int argc, const char *const *argv)
    {
    FILE *fp;
    if((fp=fopen(argv[1], "r")) == NULL) {goto ERROR1;}
    if (fp)
    {
    ...
  7. haha, just googled it :P thanks for that btw

    haha, just googled it :P thanks for that btw
  8. there are three lists in file that I need to read...

    there are three lists in file that I need to read into the arrays and print out in a different file, for now file.stdout, but it is empty when I run the program, why?
  9. Question regarding reading data from file into arrays

    #include <stdio.h>

    int lines,i;
    double *t, *x, *P;

    int main(int argc, const char *const *argv)
    {
    if ( argc > 1 )
    {
    FILE *file = fopen(argv[1], "r"); /* Get filename from...
  10. Replies
    13
    Views
    1,578

    for(trial = 0; trial < N; trial++) { ...

    for(trial = 0; trial < N; trial++)
    {
    nstep = 0;
    t = 0.0;
    dis = 0;
    while(t < to)
    {
    tau = tao * (1 + g * t);
    dt = -log(a) * tau;
    u = gsl_ran_flat (r, 0.0,...
  11. Replies
    13
    Views
    1,578

    ah, figured it out, thanks very much

    ah, figured it out, thanks very much
  12. Replies
    13
    Views
    1,578

    Hm...thank you all for the responses, but there...

    Hm...thank you all for the responses, but there is one problem with my current code. When I run it, it displays nothing. This is the exact code I used previously and now that code(which was fine...
  13. Replies
    13
    Views
    1,578

    I just want dis to be any number between 0 and...

    I just want dis to be any number between 0 and N-1. I just think of it as points on a circle. 0..1..2..3...N-1...N(back to 0)...1...2...3..etc. So there will never be N or negative numbers.
  14. Replies
    13
    Views
    1,578

    dis is a value that starts at 0 and will change...

    dis is a value that starts at 0 and will change depending on u:

    if u is < a/3, then it will decrease 1.
    if u is > 2a/3, then it will increase 1.

    if the first value u is < a/3 then the dis will...
  15. Replies
    13
    Views
    1,578

    Perodic boundary conditions

    I need to write a segment of a code where it allows the program to run in a loop basically...so the range of this code is going to be from 0 - (N-1) for example, I want:

    if the code happens to...
  16. Replies
    16
    Views
    2,419

    not currently at my workstation right now, but...

    not currently at my workstation right now, but I'm curious to why nstep would be so huge... nstep has been predetermined and *times has allocated enough memories for maxstep double (which supposedly...
  17. Replies
    16
    Views
    2,419

    *bump* help :)

    *bump*

    help :)
  18. Replies
    16
    Views
    2,419

    #include #include #include...

    #include <stdio.h>
    #include <math.h>
    #include <stdlib.h>
    #include <time.h>
    #include <gsl/gsl_rng.h>
    #include <gsl/gsl_randist.h>

    int main(int argc, char *argv[])
    {
    int N, i = 0, j = 0,...
  19. Replies
    16
    Views
    2,419

    b[trial] = 0.0; That's not supposed to be...

    b[trial] = 0.0;


    That's not supposed to be there, instead there should have been a loop that initializes all the b values. =) I just found that out.
  20. Replies
    16
    Views
    2,419

    The code is working fine, there are some...

    The code is working fine, there are some malfunctions in the results, or it could be that I'm misinterpreting it.

    I'm running 20 trials.
    Each particle has a position after a certain steps.
    The...
  21. Replies
    16
    Views
    2,419

    Thanks, but could you explain to me why my two...

    Thanks, but could you explain to me why my two columns don't sum up to 20 respectively? I run 20 trials, so it should have a registered position for every step of the 20 trials. The table is of...
  22. Replies
    16
    Views
    2,419

    #include #include #include...

    #include <stdio.h>
    #include <math.h>
    #include <stdlib.h>
    #include <time.h>
    #include <gsl/gsl_rng.h>
    #include <gsl/gsl_randist.h>

    int main(int argc, char *argv[])
    {
    int N, i = 0, j = 0,...
  23. Replies
    16
    Views
    2,419

    int N, i = 0, j = 0, trial, to = 0, dis = 0,...

    int N, i = 0, j = 0, trial, to = 0, dis = 0, maxstep = 0, nstep = 0;
    double tao, tau, dx, counter = 0, u = 0, a = 0, dt = 0, t = 0, g = 0;
    double *array, *b;


    printing to file.stderr to...
  24. Replies
    16
    Views
    2,419

    Mutidimensional Array problem

    for(trial = 0; trial < N; trial++)
    {
    b[trial] = 0.0;
    nstep = 0;
    t = 0.0;
    dis = 0;
    counter = 0;
    while(t < to)
    {
    tau = tao * (1 + g * t); //tao, g,...
  25. Replies
    1
    Views
    1,642

    gnuplot question

    can you plot 3D graphs with 3 lists of data in gnuplot?

    if so, I have data list 1, 2 and 3, what syntax do I use to plot it in 3D?
Results 1 to 25 of 65
Page 1 of 3 1 2 3