Ok so I developed a code in MATLAB with numerous nested loops that cannot be vectorized. To speed up processing I "codegen" this file. The problem here is that I am calling a function which is in gcc (or mex) and not in a .m file. Function here: http://www.mathworks.com/matlabcentral/fileexchange/21702-3d-volume-interpolation-with-ba-interp3--fast-interp3-replacement
Does anyone knows how to fix this?
Here goes the structure of the main file (main.m):
function OUT=main(IN)
assert(isa(IN,'double'));
assert(all(size(IN)==[256,256,128]));
for i=1:I
for j=1:J
for m=1:M
[.....]
OUT=ba_interp3(Y,X,Z,IN,reg_y,reg_x,reg_z,'nearest'); %%% function in either cpp or mex file
[.....]
end
end
end
end
MATLAB ERROR:
Only MATLAB files are supported for code generation. Unsupported file extension 'mexa64'