jeanluct / braidlab

Matlab package for analyzing data using braids
GNU General Public License v3.0
23 stars 9 forks source link

Empty loops cause braidlab to crash #123

Closed mbudisic closed 9 years ago

mbudisic commented 9 years ago

At this point, empty coordinate vector [] ( 0x0 double ) and zeros(1,0) (1x0 double) cause different behavior for length functions. In particular, this leads to the segfault of MEX intaxis function, while forcing Matlab's implementation of intaxis causes just regular Matlab error about mismatched indices to be thrown.

For example:

>> C = zeros(1,0)
>> L = braidlab.loop(C);
>> L.intaxis
mbudisic commented 9 years ago

For now, I am going to disallow passing an empty coordinate vector to braidlab.loop constructor.

jeanluct commented 9 years ago

See also issue #128.