Hi,
OK, thanks for the pointers. I notices that some functions were labels 'GNU Extensions' so wasn't too sure if I could point general users to that GNU C Library docs, but if they read it...
Type: Posts; User: boyfarrell
Hi,
OK, thanks for the pointers. I notices that some functions were labels 'GNU Extensions' so wasn't too sure if I could point general users to that GNU C Library docs, but if they read it...
Hello,
Is the Standard C Library API on the GNU website (http://www.gnu.org/software/libc/manual/html_node/index.html) the correct reference for all C programmes? Moreover, it is the version of C...
Hi,
'pgm' means programme I guess...
You can find information on the standard library functions here:
http://www.gnu.org/software/libc/manual/html_node/Working-Directory.html
Pete is right. According to the the GSL docs (http://www.csse.uwa.edu.au/programming/gsl-1.0/gsl-ref_34.html) the 7th argument of that function is the number of elements in the array you are passing...
For a well designed and open-source implementation of a histogram have a look here:
http://www.gnu.org/software/gsl/manual/html_node/Histograms.html.
Here is a list of some other RNG
e.g if you want gfsr4 RNG then,
GSL_RNG_TYPE="gfsr4"
then if you want use a different seed,
GSL_RNG_SEED=983759
Hi,
They are environmental variables for your shell, have a look at the example source code.
Cheers,
Dan.
Hello,
Please tell how you installed GSL. Did you down the load source code and complete the standard, ./configure, make, sudo make install? Or did you use a package manager?
Chances are that...
Hi,
In the first line of the program you specify the type of data,
double **data;
data is already a pointer to an array of pointers to doubles... which is what read_data requires it to be....
Damn! People in this board are just too damn efficient! Nobody had replied 5 mins ago when I first looked.
Yes, all the above points...! The following doesn't return any errors with -Wall...
You could also, make a GUI for your application, or make your application read command-line arguments. This assumes that you are happy using the Cocoa Framework which is probably included in your...
Congratulations Tyrant!
You just figured out a large chunk of code that will be very useful.
No you didn't get anything wrong. The post above was telling me I wasn't following standard coding...
What rule book is this from?
This typedef trick makes functions calls using these structs more compact, unless there is another way which obeys the rules? Maybe prefix with a name is a better...
I don't know anything about C++ so I can't answer that question, have a look here, C++ and Objective-C Compared.
But as far I'm aware it is an object orientated language in the style of smalltalk...
I would suggest that you use this function to return two number, the rows and columns.
int fill_struct_integers(const char *fileName, unsigned *rows, unsigned *columns)
{
int x, y,...
Hello,
This is something I have to do all the time, for my data processing and simulation code (scientific programming).
Define you structures with a typedef like this (notice I have changed...
You CAN use objects in C with Objective-C.
Objective-C (or objc as it is sometimes written) is a superset of C. This means that it IS C, but with objects added. You don't even have to use objects...
Hello,
What is the best way to find the determinant of matrix using C code?
I have heard about cblas and clinpack but I couldn't find anything in the way of documentation or example code for...
Hi,
#importis apart of the Objective-C run-time. It is the same as
#include, however, it first checks to see if a file has already been included, if so I won't include it again.
The reason...
Hi,
I tried using #define however it does seem to work in my simple example programme,
#import <stdio.h>
#define double long double
int main(int argc, char *argv[])
{
Hello,
I have a quite a lot of code, 30 files or so, most of which is mathematical number crunching stuff. All the floating point number are defined as the double data-type. Is there a quick and...
Hey thanks guys, I do tend to jumble things around somestimes! I didn't notice I reversed the 'not equal too'. So it really throw me when the compiler returned no error message!
Cheers for...
Hi all.
I only want the programme to run if lengthX = lengthY = ptsF
If not the above I would like an error custom error message to be printed and then the whole program to exit.
I have...
You legend!
Thanks so much, works perfectly now.
Cheers, Daniel. ;)
Think I will be very easy to make fscanf read a file with 2 columns. You just need to change the 'format' (i.e. second input of fscanf) to \f\t\f\n. This would expect a float, a tab, another float...