Proper error handling of mds-related errors

It is proposed to use mds status flag passed through tdi to check for errors, instead of tests of the returned data directly.

For example replacing

d = tdi('expression')
if ~ischar(d.data) && ~isempty(d.data)
 % use data
else
 warning('problem')
end

with

[d] = tdi('expression')
if ~rem(d.status,2) % unambigious way to check for problems
  warning('problem')
end

Previous discussion:

Edited by Federico Felici
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information