4 lines
95 B
Matlab
4 lines
95 B
Matlab
function x = isbb(s)
|
|
t = cumsum((s=='[') - (s==']'));
|
|
x = all(t>=0) && (t(end)==0);
|
|
end;
|