jeanluct / braidlab

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

Error in fetching number of strands for VPI braids #125

Closed mbudisic closed 9 years ago

mbudisic commented 9 years ago

The issue seems to be incompatible arguments to max elements.

>> B = braidlab.braid([1,-2],'vpi')

B = 

 < 1 -2 >

>> B.n
Error using max
Mixed inputs must be either single and double or integer and scalar double. All other combinations are not allowed.

Error in braidlab.braid/get.n (line 276)
      value = double(max(max(abs(obj.word))+1,obj.privaten));
mbudisic commented 9 years ago

Silly me: there are no VPI braids. But this uncovered a bug in braid.setn that allowed setting non-numeric values as number of strands. Fixed by 52e1e46cafa42af53e4dec991341d0000308da33