Search:

Type: Posts; User: Isolda_

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. I don't believe copy the libraries was important,...

    I don't believe copy the libraries was important, but obviusly I was using them in my code. Here is with everything else; the segmentation fault disappear, but there is nothing in my console: the...
  2. This is my latests code: int main(){ ...

    This is my latests code:




    int main(){

    double **a;
    int i,j;
    int nsteps, dim;
  3. O_O Each time I understand less about this...

    O_O

    Each time I understand less about this code; when I execute it, appears the "egmentation fault (core dumped)" message. :(
  4. It does't work. My data file, wrt.dat, has the...

    It does't work. My data file, wrt.dat, has the first two lines with two numbers: the first is the number if rows, and the second, the number of colums. My code is like this:




    int main(){

    ...
  5. Hello again; I revive this topic. This is the...

    Hello again; I revive this topic.

    This is the problem: I create a data file, with NSTEPS rows and DIM columns, but I cannot read it using fscanf.

    My code is as follows:



    for(i = 0; i <...
  6. Replies
    4
    Views
    1,304

    YEs!!! I had done this for( i = 0; i

    YEs!!!

    I had done this


    for( i = 0; i < DIM; i++){
    for( j = 0; j < DIM; j++){
    for ( k = 1; k <= cont; k++){
    p=0;
    if( i == s_c1[k][0] && j == s_c1[k][1] ) {
  7. Replies
    4
    Views
    1,304

    ¿What is happening with this If statment?

    Hi again!


    This is my code.


    for( i = 0; i < DIM; i++){
    for( j = 0; j < DIM; j++){
    for ( k = 1; k <= cont; k++){
  8. Replies
    6
    Views
    1,306

    Yes, I corrected it in my edition of the post....

    Yes, I corrected it in my edition of the post. Thanks!
  9. Replies
    8
    Views
    3,457

    Sorry, no. I changed my code: int...

    Sorry, no.

    I changed my code:




    int **prob;
    prob=malloc (DIMENSION * DIMENSION*sizeof ( int* ));
  10. Replies
    6
    Views
    1,306

    ¿Do you say, instead of use the limits ...

    &#191;Do you say, instead of use the limits
    (j-DIM/2)/25.0, etc., asing each of this limits to a local variable and then ask?



    inf_x=(i-DIMENSION/2)/25.0;
    sup_x=(i+1-DIMENSION/2)/25.0;...
  11. Replies
    6
    Views
    1,306

    Problem with ">", "

    This is embarrassing, but i have no idea of what is happening.

    I'm using numerical integration to solve a ODE, and I asked my program where the final point is. I devided the phase space in little...
  12. Replies
    8
    Views
    3,457

    I'm trying with this, and at the moment it seems...

    I'm trying with this, and at the moment it seems to work fine.



    int **prob=(int **)malloc(DIMENSION*DIMENSION*sizeof (int*));

    for(i=0;i<DIMENSION*DIMENSION;i++){
    ...
  13. Ok; thanks a lot. :) (I love C xD)

    Ok; thanks a lot. :) (I love C xD)
  14. Perfect! I solved the problem! Actually I got...

    Perfect! I solved the problem! Actually I got more problems if a don't create the multiple data files, so I did this:



    FILE *fp[101]; //number of files I need
    char fname[25];

    for...
  15. Replies
    8
    Views
    3,457

    ¿There is a way to define the array dynamically?...

    &#191;There is a way to define the array dynamically? &#191;Can I declare it like
    int *prob, without giving the size it will have?
  16. Replies
    8
    Views
    3,457

    ok. I don't see how to write in another way my...

    ok. I don't see how to write in another way my code. Here is what I'm triyng to do.

    I divided and x-y plane in little cell, each of 0.04*0.04. In each cell I started an initial condition of a...
  17. Replies
    8
    Views
    3,457

    (Core dumped) ¿A too large array?

    I'm writing a code which implementes the cell-to-cell mapping method.

    Finally I know why my compiler is saying me there is a segmentation fault. Apparently it's because I defined a matrix of...
  18. And if my data file are numbers in a "matrix...

    And if my data file are numbers in a "matrix form", i.e., organiced in several rows and columns, when a called fscanf the function will save each data of the file in a compoment of a two dimensional...
  19. Replies
    3
    Views
    1,296

    This is stupid. I put the last element I was...

    This is stupid. I put the last element I was forgotten, and I defined in a correct way i and j.

    The thing is that initially I tried to defined the matrix with decimal numbers, like
    ...
  20. Replies
    3
    Views
    1,296

    An [n][n][m] array...

    Sorry for post a lot :)

    My problem is like this: I have to define an n+n matrix. Obviusly that is not a problem. The question is that in each element of the matrix, I have to define, say, k...
  21. I found the way!!! I need numbers between 0...

    I found the way!!!

    I need numbers between 0 and 0.04; next, between 0.04 and 0.08, and so on.

    The algorithm should look like this:

    r=drand48()/25+i, where i is 0, 0.04, 0.08, and so on.
    ...
  22. drand48(): generating pseudo random numbers in a range

    Hi!

    I know you are going to tell me to search in the faq. But my problem is not there.

    The thing is this: I diveded the space between -2 and 2, both in x and in y axes, in little cells of...
  23. Ok. The first problem is solved (I save of the...

    Ok. The first problem is solved (I save of the data in an unique file.dat).

    The second problem is just what dwks say: ¿how can i save the gnuplot's output in different files ITERATIVELY? I need...
  24. I'm not sure I'm understanding you. You say,...

    I'm not sure I'm understanding you.

    You say, put all the text in the same file? That's ok. And that work's fine without additional functions. But I still have the problem with the images files.
    ...
  25. But rename doesn't work. At last I don't see how....

    But rename doesn't work. At last I don't see how.

    My problem is this:

    1. I solve an numerical integration and I save the data in a file, "file1.dat"
    2. I call Gnuplot, and gnuplot uses...
Results 1 to 25 of 27
Page 1 of 2 1 2