Search:

Type: Posts; User: z0diark

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,332

    Bogdan will be disappointed to see this :P

    Bogdan will be disappointed to see this :P
  2. Replies
    8
    Views
    2,293

    Ok I'll try it out with a smaller input file,...

    Ok I'll try it out with a smaller input file, does anyone else see anything wrong with my code?
  3. Replies
    8
    Views
    2,293

    Yes, I know it's going to loop 10000 times if b...

    Yes, I know it's going to loop 10000 times if b is pi/2. There are 10000 rows in my .dat file for x and fx as x increases from 0 to pi/2. Also, since there are 10000 rows and 2 collumns (20000...
  4. Replies
    5
    Views
    2,952

    I think he was being sarcastic :/

    I think he was being sarcastic :/
  5. Replies
    8
    Views
    2,293

    OK, but at the start I said that b must be...

    OK, but at the start I said that b must be smaller than pi/2. If you look at that surely b cannot exceed ns? Also, I tried swapping the code around so i have (i < ns) and got a segmentation fault,...
  6. Replies
    8
    Views
    2,293

    In response to points 1 and 2, is leaving them as...

    In response to points 1 and 2, is leaving them as they are going to be detrimental to the function of my program (I'd rather make it look neat afterwards if it isn't going to break my program).
    3 -...
  7. Replies
    8
    Views
    2,293

    malloc, iterations, bus error and more

    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>

    int main(int argc, char* argv [])
    {
    FILE *input;
    double valid1, valid_input, b, tmp, *x, *fx, *dx, area, total_area;...
  8. Replies
    3
    Views
    13,016

    #include #include int...

    #include <stdio.h>
    #include <stdlib.h>

    int main(int argc, char* argv[])
    {
    FILE *input;
    float v1[3], v2[3], v3[3];
    const char inp_fn[]="matrix.dat";

    input = fopen(inp_fn,...
  9. Replies
    3
    Views
    13,016

    extracting and printing data from a .dat file

    I've been given an assignment to calculate the determinant of a 3x3 matrix which I must read from a .dat file. The contents of the .dat file should look something like this:

    1 3 2
    2 3 3
    1 2 2
    ...
Results 1 to 9 of 9