I have a large writable Matlab's memmapfile object that I want to access and modify.
If I try:
mmap.Data.bit(1)
or
subsref(mmap.Data.bit, substruct('()', {1}))
I get the same value (0).
If I try:
mmap.Data.bit(1) = 1
I can assign this value very quickly, but if I try:
[~] = subsasgn(mmap.Data, substruct('.', 'bit', '()', {1}))
Matlab stops responding and never ends the line.
What is the problem with subsasgn and mmap?
What Matlab was actually trying to do is to load the whole content of the file.
The correct line is:
[~] = subsasgn(mmap, substruct('.', 'Data', '.', 'bit', '()', {1}))