Adding fallback to integer floor if channel number calculation has residual...

Adding fallback to integer floor if channel number calculation has residual value. Includes a warning message.
parent d50746a3
...@@ -141,9 +141,12 @@ end ...@@ -141,9 +141,12 @@ end
%% Channels %% Channels
channels=this.nChannels/this.nDirections; channels=this.nChannels/this.nDirections;
if(channels<1) if( channels < 1 )
warning('Number of channels per record was not detected correctly, assuming 2 channel records'); warning( 'Number of channels per record was smaller than one, assuming 2 channel records' );
channels = 2; channels = 2;
elseif( mod( channels, 2 ) ~= 0 )
warning( [ 'Number of channels per record was not and integer number, trying floor() of ' num2str( channels ) ] );
channels = floor( channels );
end end
daff_write_args.channels = channels; daff_write_args.channels = channels;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment