gllmflndn / gifti

MATLAB/Octave GIfTI Library
https://www.gllmflndn.com/software/matlab/gifti/
MIT License
25 stars 12 forks source link

Deprecated syntax in gifti/subsref.m? #1

Closed ftadel closed 3 years ago

ftadel commented 5 years ago

This line creates warnings in newer Matlab versions: https://github.com/gllmflndn/gifti/blob/master/%40gifti/subsref.m#L45

Warning example, form the Brainstorm user forum: image

Do you need these () for anything here?

gllmflndn commented 5 years ago

Hello @ftadel,

Thanks for reaching out. Yes, the () are there for a reason: when cdata contains a memory-mapped object (@file_array). I'm already aware of this compatibility issue and the code has been fixed upstream in SPM where @gifti is taken from. I'll try to make a new release of this class soon. The change is:

-            varargout{1} = varargout{1}() + 1; % indices start at 1
+            varargout{1} = full(varargout{1}) + 1; % indices start at 1
gllmflndn commented 5 years ago

I pushed a number of of rather substantial changes that should fix your issue among other things. It would be great if you could test this new version and let me know if you observe any bug or unexpected side effect.