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
[Bug]: Syntax valid only after Matlab 2018b #437
Comments
Thanks for raising this @ftadel. It's good to have documentation of this issue in case others run into it. Thanks for the fix suggestion. I think in this particular case we might be able to just use the more generic syntax you suggest for compatibility. This does raise a bigger question though of what versions of MATLAB we want to support in cases where the changes would need to be more substantial. I think going more than 5 years back might be difficult. Certainly certain features such as dynamically loaded filters would not be available. I was under the impression that most MATLAB users have a license that entitles them to download the latest version, so I am surprised to see such an old version being actively used. @lawrence-mbf, what do you think? Do you have a sense of what versions of MATLAB our users are using and how difficult it would be to support the tail of that distribution? |
For ScanImage right now we just bumped it up to 2018a. My assumption was the same as yours that most universities have a site-wide license which allows them access to the newest release. |
Unfortunately, this is true in rich universities of rich countries only. When it does not require much extra work (like in the example above with |
That's good to know. I guess for now we'll try and limit ourselves to 2017a and if there is a need to go older we can address that specifically. |
What happened?
The syntax
maxVal = max(val, [], 'all');
is used here:https://github.com/NeurodataWithoutBorders/matnwb/blob/master/%2Btypes/%2Butil/correctType.m#L34
It appeared in Matlab 2018b and crashes before that.
But it seems like matnwb should be working with older versions of Matlab.
This newer syntax can be easily replaced with:
maxVal = max(val(:));
This error was reported on the Brainstorm forum:
https://neuroimage.usc.edu/forums/t/error-opening-nwb-files/21025/20
Steps to Reproduce
Error Message
Operating System
Windows
Matlab Version
2017b
Code of Conduct
The text was updated successfully, but these errors were encountered: