MATLAB: Error when using decsg (PDE Toolbox)

decsgpde

Hi there,
I recently encountered a problem with the function "decsg.m" of the PDE Toolbox. I normally use this function to generate a FE mesh after segmenting an image. This script has always worked.
I just rerunned some old data, and I got this error:
""Error in decsg (line 103) if isempty(gd), dl1=[]; bt1=[]; dl=[]; bt=[]; msb=[]; return, end
Output argument "dl1" (and maybe others) not assigned during call to "D:\USlib\decsg.m>decsg"."
This is quite weird and very surprising. I checked the input variables, they are all ok. No conflicts … what's wrong here?
Kind regards
Richard

Best Answer

Please make sure that your input matrix is valid. For example if it defined polygons, please make sure it does not contain any duplicate points.
Related Question