matlab: fix logarithmic VTK export

pull/4/head
Stefan Mahr 2013-05-29 15:05:51 +02:00
parent 8e8351d038
commit 0e11975235
1 changed files with 4 additions and 3 deletions

View File

@ -47,11 +47,12 @@ for n=1:2:numel(varargin)
end
if ~isempty(logscale)
farfield = 20*log10(farfield) + maxgain;
farfield = 20*log10(farfield) + maxgain - logscale;
ind = find(farfield<0);
farfield(ind)=0;
else
maxgain = 0; % force 0 for linear plot
% force 0 for linear plot
logscale = 0;
end
t = thetaRange*pi/180;
@ -100,5 +101,5 @@ fprintf(fid,'POINT_DATA %d\n',numel(t)*numel(a));
fprintf(fid,['SCALARS gain double 1\nLOOKUP_TABLE default\n']);
fclose(fid);
dumpField = farfield(:) + maxgain;
dumpField = farfield(:) + logscale;
save('-ascii','-append',filename,'dumpField')