deal with MATLAB warning for xmltools #121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.