you can use octave or matlab et al to calculate the values and use a lookup table.
alternativly you can code some functions yourself. depends on how good you are with maths and programing.
just a note, matrices can get pretty processor intensive. so you need to trade off between accuracy and speed of opperation.