You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Erick Fredj found a bug when he ran this code on his data:
#!matlab
LonLat(:,1,:)=east';
LonLat(:,2,:)=north';
XY=LonLat(:,:,2000);
b = braid (XY);
b = compact(b);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Plot Braid
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot(b)
This creates the horrible figure:
Here's a simpler code that breaks everything:
#!matlab
>> XY=randomwalk(1,10,.1); % a braid of one strand!
>> b=braid(XY)
Error using braidlab.braid/set.n (line 196)
Too few strings for generators.
Error in braidlab.braid (line 183)
br.n = max(abs(b))+1;
>> b
b =
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in braidlab.braid/char (line 368)
str = ['< ' str ' >'];
Error in braidlab.braid/disp (line 377)
c = char(b);
>> plot(b)
The output of plot(b) has serious issues!
The fix should be, I think, to make sure a braid of one strand is always the identity? Shouldn't be too hard to implement. Make sure plot(b) handles things ok for the identity braid, even for one strand.
The text was updated successfully, but these errors were encountered:
From Jean-Luc Thiffeault on 2014-01-31 02:22:09+00:00
Ok, since in this case XY is a two-dimensional array (not 3, because it has a singleton trailing dimension), the user could think they're doing something else, like creating an array of braids. This is not allowed (in the constructor), at least not now. But just in case, print a warning:
#!matlab
>> b = braid([1 2;1 3;-1 1])
Warning: Creating trivial braid from single trajectory (did you mean that?).
> In braid.braid>braid.braid at 183
b =
< e >
Erick Fredj found a bug when he ran this code on his data:
This creates the horrible figure:
Here's a simpler code that breaks everything:
The output of plot(b) has serious issues!
The fix should be, I think, to make sure a braid of one strand is always the identity? Shouldn't be too hard to implement. Make sure plot(b) handles things ok for the identity braid, even for one strand.
The text was updated successfully, but these errors were encountered: