Issue 68, 3 January 2008

In this issue:

Top Story - NAG Optimization Routines and NAG Toolbox for MATLAB aid Finance Research

NAG continues to collaborate with experts in the field of mathematics, science and computing, which helps ensure that its primary product offering, the NAG Library, remains the most comprehensive and up-to-date set of quality numerical algorithms available today.

Recently, the head of the Numerical Optimization Centre at the University of Hertfordshire and long-time NAG collaborator, Dr Michael Bartholomew-Biggs, has been researching with a newly developed set of global optimization routines from NAG.

The initial requirement arose when Dr Bartholomew-Biggs needed to solve a global optimization problem associated with the selection of financial portfolios. Through his regular contacts with NAG he was aware that new global optimization software was being developed. With assistance from NAG provided by Chief Technical Officer Mike Dewar and Numerical Software Developer Mat Cross, the new routines were made available using the NAG Toolbox for MATLAB®, currently in beta 2.

Preliminary results obtained using this software appear in a joint paper that Dr Bartholomew-Biggs presented at the Global Optimisation Workshop, Imperial College in December 2007. The paper, entitled 'Optimizing Omega', considers a performance evaluation measure for comparison between financial assets - see for an introduction to the Omega function.

If you would like more information on the NAG Toolbox for MATLAB and to try the software for yourself, please visit our website - if you have questions about the Global Optimization routines please email us at

Invitation to NAG Quant Day London 2008 - February 21 2008

NAG is delighted to team up once again with the finance specialist publication Wilmott to host the NAG Quant Day London 2008 - the next in a series of highly informative presentations for those working in the finance industry. Speakers on the day will include:

Ely Klepfish - UBS AG “Risk Modelling, portfolio optimisation and performance backtest”
Ser-Huang Poon - Professor of Finance - Manchester Business School “Interest rate models for asset liability management”
Mike Giles - Professor of Scientific Computing - Oxford University

Event venue and times will be released shortly. The event will be free to attend and promises to be highly informative. If you would like to receive an invitation please email us at

General Information - Quality, Flexibility and Solid Foundations

Did you know that there are over 130 different implementations of the various NAG Libraries? No mean feat for NAG's development, implementation, documentation and quality assurance team!

NAG has always been committed to serving the development community with high quality, flexible and robust numerical routines, and since the launch of Mark 1 of the NAG Library, has gone on to develop many different versions each with its own unique characteristics and associated implementations. The NAG Library, currently available in C, Fortran, and for shared memory and distributed memory parallel computing are all available in an extensive number of implementations ensuring that users of platforms commonly deployed for technical computing can make use of the functionality within the library. The algorithms in the libraries can also be readily called from other languages and software packages such as Java, Excel, MATLAB, C++, C# and more.

The development of the NAG Library is driven by the need to implement algorithmic functionality for evolving mathematical and statistical techniques. Advances in hardware, software, operating systems and compilers also affect the library development.

NAG strives to react quickly to customer demand and positively encourages feedback on the NAG Library and other NAG products so if you have comments to make, or would like to see a particular routines included in future versions, please tell us. You can get in touch with us by the usual means of email or phone, or speak with your account manager.

Product Spotlight - IRIS Explorer

IRIS Explorer is NAG's powerful tool for developing customized visualization applications, recently used in the world's largest climate change experiment. Its visual programming environment enables you to develop, prototype and build these applications quickly and easily. IRIS Explorer, with its broad range of visualization techniques, from simple graphs to multidimensional animation, enables you to readily discern trends and relationships in your data.

IRIS Explorer is a standards-based package that utilizes the Open Inventor™, ImageVision™ and OpenGL™ libraries, together with NAG's world-class numerical libraries. It is available on a broad range of systems including Microsoft Windows, Unix and Linux platforms.

To learn more about IRIS Explorer visit our website

Forthcoming Events - UK
  • NAG Seminar - Imperial College, London
    15 January 2008

    NAG continues its run of UK seminars in January when it hosts a workshop type event at Imperial College London on the 15 January. The seminar will be of interest to those wanting to learn more about NAG's numerical libraries and how they can be used from within MATLAB, Maple and Excel as well as the more traditional programming languages such as C, C++, C#, Fortran and Java.
  • DevWeek - London
    10 - 14 March 2008

    In March NAG is going to be present at the biggest developer exhibition in the UK, DevWeek. The event promises to be a great place to learn all the new and cutting edge advances in the application development environment and also features many talks by industry and development experts.

    NAG will be on hand to demonstrate recent product development highlights including the NAG Toolbox for MATLAB and the NAG .NET Library. For more information on the event visit

Tips & Hints - IRIS Explorer: Creating a volume from a series of images

It's often useful to be able to collate a set of images into a volume. For example, the images could be slices from a MRI scan, through a 3D object and there is a need to reconstruct the object in 3D space.

The simplest method is to use WriteAnimation. It writes incoming 2D lattices into a single 3D image in FIT format. The FIT file can then be read in by ReadImg, which outputs the data as a 3D lattice. Alternatively, if the images are already on disk as .rgb files, use the ReadImages module, which reads in a series of these files and composes them into a 3D lattice. If you already have the component lattices in IRIS Explorer and simply want a module that stacks them, you must write a new module. Although you could use the module builder, it's easier to use the LatFunction module, which enables simple creation and manipulation of lattices via a script written in the Shape language; the script is passed to the module and interpreted by it, which bypasses the traditional edit-compile-link cycle, leading to more rapid development. Here is a script that takes two lattices and stacks them together to create a new lattice with a dimensionality which is one greater than that of either of the input lattices.

foo := scalar_lattice_in(First_In)
bar := scalar_lattice_in(Second_In)
baz := outside([foo, bar])
First_Out := scalar_lattice_out(baz)

The input lattices must be the same size otherwise LatFunction will complain with a - somewhat obscure - error message. The lattices are stacked in the slowest varying dimension - e.g., if both the input lattices have dimensions of 8 by 8, then the output lattice will have dimensions of 2 by 8 by 8. The stacking direction can be switched to the fastest varying dimension using the inside command - i.e., to get a lattice that's 8 by 8 by 2, change the third line to

baz := inside([foo, bar])

See Chapter 10 of the Module Writer's Guide for more information on the LatFunction module and the Shape language.

For more information about NAG's visualization software IRIS Explorer please see

Previous Tips & Hints can be found on our website

Product News - Latest Implementations

NAG is committed to offering new implementations of its broad range of numerical and statistical software components and compilers and tools. The following implementations for NAG products have become available since the last issue of our newsletter:

The NAG C Library (, Mark 8 is now also available for the following platform:

  • x64 Windows64 using the Microsoft Visual C++ Compiler
  • Microsoft Windows DLL using the Microsoft Visual C++ Compiler

The NAG Fortran Library, Mark 21 is now also available for the following platform:

  • Apple Intel MAC OS X using the Intel Fortran v9.1 Compiler, Double Precision

News for NAG Toolbox for MATLAB Beta Testers

Due to changes in the way MATLAB ships ACML the current toolbox does not work with MATLAB 2007b on Linux platforms. For a simple fix to this problem please go to

For full details of these and all other available implementations, visit the NAG site. Comprehensive technical details of each implementation are given in the relevant Installation and User Notes at

Managing your subscription

Please feel free to forward this newsletter to colleagues or to post it to your company's Intranet sites.

To subscribe, unsubscribe or learn more about managing your subscription, please see: