#include "mex.h" #include "math.h" #include "myheader.h" /* NOTE! Here we explicitly use the fact that matlab allocates all of these with the initial value 0 */ #define pow(a,b) (exp((b)*log(a))) void vextract(TENSOR2i A,TENSOR2i I,TENSOR2i B) { /* matlab's A(I) = B */ int i; for(i=0; i