In the third of a series of posts on technical tips for The NAG Library, I will be looking at calling the example programs which come with every routine. That is right, for almost all 1700 plus routines in The NAG Library, we provide you with an example program for our C, Fortran, and MATLAB implementations. These examples programs come with results and initial data where appropriate. You can find the examples at the bottom of the routine’s documentation page and within The NAG Library installation folder on your machine within the examples/source directory. The data is located within examples/data, and examples/results contain the results.

For example to call the a Fortran example, you must compile the example program and link it to the NAG Library as if you were compiling your application. Please consult the User’s Notes or our technical support if you require assistance with this step. One the executable has been created; you can run it from the command line and direct the data to executable using the less than symbol: ./example.f90 < data.d

For your convenience, we also include tools that allow you to run a single example program. On UNIX based systems, these tools can be found in the scripts directory and on Windows we have included a nag_example_DLL in the batch folder.

As always, if you require any assistance, then please do not hesitate to contact our dedicated technical support desk.

Leave a Comment

This form has an automated anti-spam system running (Recaptcha). If it suspects you are not a valid visitor a backup challenge will appear here.