error: Edge vector must be monotonically non-decreasing.
Opened this issue · 0 comments
Hi!
I'm loading my own trace files as stacked dats, and for some files I got this weird error message:
Edge vector must be monotonically non-decreasing.
I'm guessing it has something to do with extremely low E_FRET values, but I'm not sure. WIth some effort I traced the error back to +ebfret/+analysis/x_lim.m, line 38:
[h b] = hist(x, linspace(left(end), right(end), min(200, length(x)/10)));
The issue being that the linspace generates only NaNs, which the hist then can't handle. My matlab is very rusty and I'm unfamiliar with that left/right(end) syntax, but when I change it to this, my problem seems solved:
[h b] = hist(x, linspace(min(x), max(x), min(200, length(x)/10)));
I'm not sure if this is always giving the expected behavior but it seems alright in my cases. Here's a file to reproduce the error:
Do you have an idea of why this happens? Should I make a pull request with this modification?
This happens on ubuntu 20.04 + MATLAB2020b