Ok I got it working by using version 4.8. However, I could only offset perfect rectangles and only if the offset polygon were smaller the half the minimum side length. Is it possible for you to create an example where the algorithm works as it should, and include only one polygon in the example so it is easier to see how it works.
Thank you for a good function. This should be a part of MATLAB's standard package. You should consider however, the case where ind is larger than the maximum number of rows.
A = zeros(2,3) ; B = [1;1];
c = insertrows(A.', B.',5)
Here it would be a good idea to add zeros at the end, or something like that. I guess the current implementation is a safety for users that have counted worng, but this should not be a limitation for the users that do this intently.
Also, the first index seems to be zero here. This is not normally the case in MATLAB and may cause confusion if a script or program have more than one author.
Thanks for the program. It is great!
only fcs.c is needed. download it and compile with
>> mex fcs.c
(mine version is MATLAB2008b on WinXP SP2), so no -O or -DWIN32 options needed.
It will automatically generate fcs.mexw32.
The syntax of fcs.mexw32 file is documented in fcs.m which is nothing but an empty shell.