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

deal with MATLAB warning for xmltools #121

Merged
merged 2 commits into from
Dec 3, 2024

Conversation

SaraMati
Copy link
Contributor

@SaraMati SaraMati commented Dec 2, 2024

There is a warning when running NeuroScope2:
"Warning: Colon operands must be real scalars. This warning will become an error in a future release."

this is because at lines 227 and 231 of xmltools, the f_beg variable that is used for slicing can be an array when it should be an scaler. Currently, MATLAB only reads the first item of the array but this will be deprecated soon.

in the xmltools, the f_beg is determined by looking for different identifying spaces, and in the other lines of the code, f_beg=f_beg(1) to only choose the first instance of the identified. But in lines 227 and 231, for which the f_beg is chosen by looking for spaces in the string is left as f_beg... in the instances that the f_beg is an array it is rising the said warning. I changed the code to f_beg(1) in those lines.

@petersenpeter
Copy link
Owner

Very nice, Sara. Appreciated!

@petersenpeter petersenpeter merged commit 3f39141 into petersenpeter:main Dec 3, 2024
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

Successfully merging this pull request may close these issues.

2 participants