This is the Simu1b Library version 0.1.0.

Libsimu1b was initially written to simulate the NMR behavior of a 1-spin system under free evolution or radio-frequency pulse action. This is an extension of the very simple Simu1 Library. Libsimu1b is able to compute the matrix that is associated to a rotation of given angle and axis, and to apply it to a vector. It also allows to analyze a rotation matrix to deduce its axis vector and angle value.

This is a C API. The user has to write a C program to use it. A simple executable program named demo can be built from the distribution file. The demo.c file provides an example of libsimu1b use.


The libsimu1 API

Data types

The libsimu1b API defines two data types:

Named constants

#define GOOD 1
#define BAD 0
#define THR 1.0e-10 ;
#define DEFAULT_FORMAT "%.5f"
#define DEFAULT_COLSEP " "
#define DEFAULT_ROWSEP "\n"

General utilities

Vector utilities

Matrix utilities

Axis utilities

Rotation matrix calculations

Jean-Marc Nuzillard

March 31st 2006