Commit 5e870300 authored by Jonas Stienen's avatar Jonas Stienen

Fixing character problems that probably occurred after text encoding conversion.

parent 76109e96
......@@ -20,7 +20,7 @@ function [] = daffv17_write( varargin )
% 'MPS' => Magnitude phase spectra,
% 'DFT' => discrete fourier spectra)
% datafunc function Data function (delivers the data for a direction)
% orient vector-3 Orientation [yaw pitch roll] angles []
% orient vector-3 Orientation [yaw pitch roll] angles []
% channels int Number of channels
%
% alphares float Resolution of alpha-angles
......@@ -361,17 +361,17 @@ function [] = daffv17_write( varargin )
fprintf('Content type: \t%s\n', contentStr);
fprintf('Num channels: \t%d\n', args.channels);
fprintf('Num alpha points: \t%d\n', args.alphapoints);
fprintf('Alpha range: \t[%0.1f�, %0.1f�]\n', alphastart, alphaend);
fprintf('Alpha resolution: \t%0.1f\n', args.alphares);
fprintf('Alpha range: \t[%0.1f, %0.1f]\n', alphastart, alphaend);
fprintf('Alpha resolution: \t%0.1f\n', args.alphares);
fprintf('Num beta points: \t%d\n', args.betapoints);
fprintf('Beta range: \t[%0.1f�, %0.1f�]\n', betastart, betaend);
fprintf('Beta resolution: \t%0.1f\n', args.betares);
fprintf('Beta range: \t[%0.1f, %0.1f]\n', betastart, betaend);
fprintf('Beta resolution: \t%0.1f\n', args.betares);
fprintf('Measurement dist.: \t%0.2f m\n', args.mdist);
fprintf('Reference value: \t%+0.1f dB\n', args.reference);
fprintf('Orientation: \t(Y%+0.1f�, P%+0.1f�, R%+0.1f�)\n', ...
fprintf('Orientation: \t(Y%+0.1f, P%+0.1f, R%+0.1f)\n', ...
args.orient(1), args.orient(2), args.orient(3));
if strcmp(args.content, 'IR')
......@@ -437,20 +437,20 @@ function [] = daffv17_write( varargin )
[channels, filterlength] = size(data);
if( ~isa( data, 'double' ) )
error( 'Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Data function must deliver double values', alpha, beta );
end
if isfield(props, 'samplerate')
if (samplerate ~= props.samplerate)
error( 'Dataset (A%0.1f�, B%0.1f�): Sampling rate does not match', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Sampling rate does not match', alpha, beta );
end
if (channels ~= args.channels)
error( 'Dataset (A%0.1f�, B%0.1f�): Number of channels does not match', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Number of channels does not match', alpha, beta );
end
if (filterlength ~= props.filterlength)
error( 'Dataset (A%0.1f�, B%0.1f�): Filter length does not match', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Filter length does not match', alpha, beta );
end
else
% Now set the global properties, if they have not been set yet
......@@ -460,7 +460,7 @@ function [] = daffv17_write( varargin )
% Check filter length for 16-byte alignment
if( mod( filterlength, 4 ) ~= 0 )
error( 'Dataset (A%0.1f�, B%0.1f�): Filter length is not a multiple of 4 (this is required for memory alignment)', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Filter length is not a multiple of 4 (this is required for memory alignment)', alpha, beta );
end
fprintf('Global properties: Sampling rate = %d Hz, filter length = %d\n',...
......@@ -536,33 +536,33 @@ function [] = daffv17_write( varargin )
[channels, numfreqs] = size(data);
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
if isfield(props, 'freqs')
if (freqs ~= props.freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Frequency support does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Frequency support does not match', alpha, beta) );
end
if (channels ~= args.channels)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Number of channels does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Number of channels does not match', alpha, beta) );
end
else
% Checks on the frequency support
if (numfreqs ~= size(freqs))
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Frequency support does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Frequency support does not match', alpha, beta) );
end;
if (min(freqs) <= 0)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be greater zero', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be greater zero', alpha, beta) );
end;
if (sort(freqs) ~= freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be stricly increasing', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be stricly increasing', alpha, beta) );
end
if (length(unique(freqs)) ~= length(freqs))
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be unique', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be unique', alpha, beta) );
end
% Now set the global properties, if they have not been set yet
......@@ -575,7 +575,7 @@ function [] = daffv17_write( varargin )
% Important: Negative magnitudes are forbidden
if (min(min(data)) < 0)
error( 'Dataset (A%0.1f�, B%0.1f�): Contains negative magnitudes', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Contains negative magnitudes', alpha, beta );
end
......@@ -603,29 +603,29 @@ function [] = daffv17_write( varargin )
[channels, numfreqs] = size(data);
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
if isfield(props, 'freqs')
if (freqs ~= props.freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Frequency support does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Frequency support does not match', alpha, beta) );
end
if (channels ~= args.channels)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Number of channels does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Number of channels does not match', alpha, beta) );
end
else
% Checks on the frequency support
if (min(freqs) <= 0)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be greater zero', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be greater zero', alpha, beta) );
end;
if (sort(freqs) ~= freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be stricly increasing', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be stricly increasing', alpha, beta) );
end
if (length(unique(freqs)) ~= length(freqs))
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be unique', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be unique', alpha, beta) );
end
% Now set the global properties, if they have not been set yet
......@@ -638,7 +638,7 @@ function [] = daffv17_write( varargin )
% Important: Phases must range between +-pi
if (min(min(data)) < -pi) || (max(max(data)) > pi)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Phases must range between +-pi', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Phases must range between +-pi', alpha, beta) );
end
props.globalPeak = 0;
......@@ -661,29 +661,29 @@ function [] = daffv17_write( varargin )
[channels, numfreqs] = size(data);
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values', alpha, beta) );
end
if isfield(props, 'freqs')
if (freqs ~= props.freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Frequency support does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Frequency support does not match', alpha, beta) );
end
if (channels ~= args.channels)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Number of channels does not match', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Number of channels does not match', alpha, beta) );
end
else
% Checks on the frequency support
if (min(freqs) <= 0)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be greater zero', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be greater zero', alpha, beta) );
end;
if (sort(freqs) ~= freqs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be stricly increasing', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be stricly increasing', alpha, beta) );
end
if (length(unique(freqs)) ~= length(freqs))
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Support frequencies must be unique', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Support frequencies must be unique', alpha, beta) );
end
% Now set the global properties, if they have not been set yet
......@@ -716,31 +716,31 @@ function [] = daffv17_write( varargin )
[ channels, numDFTCoeffs ] = size( data );
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values', alpha, beta) );
end
% test something (TODO)
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values', alpha, beta) );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values', alpha, beta) );
end
if (class(isSymetric) ~= 'logical')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): third parameter isSymetric must be logical', alpha, beta));
error( sprintf('Dataset (A%0.1f, B%0.1f): third parameter isSymetric must be logical', alpha, beta));
end
if isfield( props, 'samplerate' )
if ( sampleRate ~= props.sampleRate )
error( sprintf( 'Dataset (A%0.1f�, B%0.1f�): Sample rate does not match', alpha, beta ) );
error( sprintf( 'Dataset (A%0.1f, B%0.1f): Sample rate does not match', alpha, beta ) );
end
end
if isfield(props, 'numDFTCoeffs')
if (numDFTCoeffs ~= props.numDFTCoeffs)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Number of discrete fourier spectra coefficients is not constant', alpha, beta));
error( sprintf('Dataset (A%0.1f, B%0.1f): Number of discrete fourier spectra coefficients is not constant', alpha, beta));
end
else
if (numDFTCoeffs <= 0)
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Number of discrete fourier spectra coefficients must be greater than zero', alpha, beta));
error( sprintf('Dataset (A%0.1f, B%0.1f): Number of discrete fourier spectra coefficients must be greater than zero', alpha, beta));
end
props.numDFTCoeffs = numDFTCoeffs;
......@@ -992,13 +992,13 @@ function [] = daffv17_write( varargin )
[ data, ~, ~ ] = args.datafunc( alpha, beta, args.userdata );
if( ~isa( data, 'double' ) )
error( 'Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values', alpha, beta );
error( 'Dataset (A%0.1f, B%0.1f): Data function must deliver double values', alpha, beta );
end
% Clipping check
peak = max(max(abs(data)));
if ((peak > 1) && (~args.quiet))
warning( 'Dataset (A%0.1f�, B%0.1f�): Clipping occured (peak %0.3f)', alpha, beta, peak );
warning( 'Dataset (A%0.1f, B%0.1f): Clipping occured (peak %0.3f)', alpha, beta, peak );
end
for c=1:args.channels
......@@ -1049,13 +1049,13 @@ function [] = daffv17_write( varargin )
[channels, numfreqs] = size(data);
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
% Clipping check
peak = max(max(data));
if ((peak > 1) && (~args.quiet))
warning( sprintf('Dataset (A%0.1f�, B%0.1f�): Clipping occured (peak %0.3f)', alpha, beta, peak) );
warning( sprintf('Dataset (A%0.1f, B%0.1f): Clipping occured (peak %0.3f)', alpha, beta, peak) );
end
%x{a,b}.dataOffset = zeros(1, args.channels);
......@@ -1092,7 +1092,7 @@ function [] = daffv17_write( varargin )
[channels, numfreqs] = size(data);
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
%x{a,b}.dataOffset = zeros(1, args.channels); TODO
......@@ -1128,7 +1128,7 @@ function [] = daffv17_write( varargin )
[ channels, numfreqs ] = size( data );
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
%x{a,b}.dataOffset = zeros(1, args.channels); TODO
......@@ -1168,7 +1168,7 @@ function [] = daffv17_write( varargin )
[ channels, numfreqs ] = size( data );
if (class(data) ~= 'double')
error( sprintf('Dataset (A%0.1f�, B%0.1f�): Data function must deliver double values') );
error( sprintf('Dataset (A%0.1f, B%0.1f): Data function must deliver double values') );
end
%x{a,b}.dataOffset = zeros(1, args.channels); TODO
......
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