Commit 5a5a2d0e authored by Markus Mueller-Trapet's avatar Markus Mueller-Trapet

minor bugfix for ANSI ticks

parent 3deb7428
......@@ -21,7 +21,7 @@ function varargout = ita_plottools_ticks(varargin)
%% Get ITA Toolbox preferences and Function String
verboseMode = ita_preferences('verboseMode'); %#ok<NASGU> Use to show additional information for the user
thisFuncStr = [upper(mfilename) ':']; %#ok<NASGU> Use to show warnings or infos in this functions
thisFuncStr = [upper(mfilename) ':'];
%% Initialization and Input Parsing
narginchk(1,1);
......@@ -43,13 +43,12 @@ switch(lower(mode_str))
xlabel_vec = {'' '2k' '' '4k' '' '6k' '' '8k' '' '10k' '' '12k' '' '14k' '' '16k' '' '18k' '' '20k' '' '22k'};
xtick_vec = [1000 2000 3000 4000 5000 6000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 17000 18000 19000 20000 21000 22000];
case {'ansi'}
freq = ita_ansi_center_frequencies;
freq = ita_ANSI_center_frequencies;
idxForKilo = freq >= 1000;
freqFormated = freq;
freqFormated(idxForKilo) = freqFormated(idxForKilo) / 1000;
freqFormated(idxForKilo) = freqFormated(idxForKilo) / 1000;
ansiLabel = num2str(freqFormated', '%1.1f');
......@@ -58,18 +57,16 @@ switch(lower(mode_str))
tmp = ansiLabel(iLine,:);
tmp = strrep(tmp, '.0', '');
if idxForKilo(iLine)
tmp = [ tmp ' k'];
tmp = [ tmp 'k'];
end
labelCell{iLine} = tmp;
end
xlabel_vec = labelCell;
xtick_vec = freq;
xtick_vec = freq;
otherwise
error([thisFunStr 'What mode should this be?'])
error([thisFuncStr 'What mode should this be?'])
end
%% Find output parameters
......
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