The code before:
% Reshape and convert to complex data.
data = reshape(data,2,[]); data = complex(data(1,:),data(2,:));
% THIS IS BAD QUICK FIX CODE BAD BAD BAD
if isfield(spar_info,'spec_row_upper_val')
disp badbadgoingbadcheckCSIreadsdat!
dim{2} = spar_info.spec_row_upper_val;
end
% Reshape according array-dimensions from either SPAR or second input.
try data = squeeze(reshape(data,dim{:}));
catch err
err
warning('Reshaping of SDAT-data unsuccesfull! Raw-indexing returned.');
end
Run the code and report the following error: badbadgoingbadcheckCSIreadsdat!
err =
MException - 属性:
The code before: % Reshape and convert to complex data. data = reshape(data,2,[]); data = complex(data(1,:),data(2,:));
% THIS IS BAD QUICK FIX CODE BAD BAD BAD if isfield(spar_info,'spec_row_upper_val') disp badbadgoingbadcheckCSIreadsdat! dim{2} = spar_info.spec_row_upper_val; end
% Reshape according array-dimensions from either SPAR or second input. try data = squeeze(reshape(data,dim{:})); catch err err warning('Reshaping of SDAT-data unsuccesfull! Raw-indexing returned.'); end
why add a try module?