I'm having some trouble getting past the annoying limitation that MATLAB places on not using cell arrays for compiled C++ code.
Put most generally, I have a code that makes use of some MATLAB object, and I need to have multiple instances of that objects. This would be simple enough with cell arrays, but I can't figure out how to avoid using them.
A simple code that does this would be something like the following. I'm trying to get rid of using cell arrays both for the potential of code compilation, and possibly for more efficient memory allocation.
function surf_pts = foo(images)
surf_pts = cell(size(images,3),1);
for i = 1 : size(images,3)
surf_pts{i} = detectSURFFeatures(images(:,:,i));
end