Sugocy / CSIgui

Matlab GUI for viewing, processing and partly analysing raw 3D MRSI data.
GNU General Public License v3.0
1 stars 0 forks source link

Code ( csi_readSDAT ) can not read philipsLoad data #5

Open zhangrentu opened 1 year ago

zhangrentu commented 1 year ago

Run the code and report the following error: badbadgoingbadcheckCSIreadsdat!

err =

MException - 属性:

identifier: 'MATLAB:getReshapeDims:notSameNumel'
   message: '元素数不能更改。请使用 [] 作为大小输入之一,以自动计算该维度的适当大小。'
     cause: {}
     stack: [2×1 struct]
Correction: []

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?

Sugocy commented 5 months ago

Try module: Because experimental data can be corrupt

Not sure what you mean by the other badbadgoindbadcheckCSIreadsdat part.