Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docstring for computeOnsOffs.m is totally wrong #112

Closed
qliu-Inscopix opened this issue Jul 27, 2022 · 7 comments
Closed

docstring for computeOnsOffs.m is totally wrong #112

qliu-Inscopix opened this issue Jul 27, 2022 · 7 comments

Comments

@qliu-Inscopix
Copy link

Shouldn't x(x>0) = 1 be "x(x>0.5) = 1"?

@sg-s
Copy link
Owner

sg-s commented Jul 28, 2022

no, because x is assumed to be binary (logical)

@sg-s sg-s closed this as completed Jul 28, 2022
@qliu-Inscopix
Copy link
Author

missing threshold argument in the function body:

veclib.computeOnsOffs([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]) will return [];

veclib.computeOnsOffs([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0], -5) gives the "Too many input arguments." error:

@sg-s
Copy link
Owner

sg-s commented Aug 29, 2022

veclib.computeOnsOffs([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0]) will return [];

yes, because this is a monotonic sequence -- there are no ons or offs

veclib.computeOnsOffs([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0], -5)

yes, because it only takes one argument -- a (logical) vector.

what you want to do is:

veclib.computeOnsOffs([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0] > -5)

@qliu-Inscopix
Copy link
Author

OK, a simple update to the help doc should avoid using a second argument

@sg-s
Copy link
Owner

sg-s commented Aug 29, 2022

ah i see the docstring is totally wrong. my bad!

@sg-s sg-s changed the title computeOnsOffs.m line 31 docstring for computeOnsOffs.m is totally wrong Aug 29, 2022
@sg-s sg-s reopened this Aug 29, 2022
@sg-s sg-s closed this as completed in 9a3a9b2 Aug 29, 2022
@sg-s
Copy link
Owner

sg-s commented Aug 29, 2022

@qliu-Inscopix FYI you will find the docstrings generally unreliable -- ping me if you find something missing/out of sync

@qliu-Inscopix
Copy link
Author

qliu-Inscopix commented Aug 29, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants