#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))) int ih,jh,mh,nh; TENSOR2 P; TENSOR2i X,X1,ul,uin,zl,zjn,ii,jj,oi,oi1,jjn,oijjn,oijjn1,dims,dimz,dimjn; void vhconcat(TENSOR2i *A,TENSOR2i B,TENSOR2i C) { /* matlab's A = [B C] */ int k; setdim2((*A),1,d2(B)+d2(C)); for(k=0; k