matlab: fix logarithmic VTK export
parent
8e8351d038
commit
0e11975235
|
@ -47,11 +47,12 @@ for n=1:2:numel(varargin)
|
||||||
end
|
end
|
||||||
|
|
||||||
if ~isempty(logscale)
|
if ~isempty(logscale)
|
||||||
farfield = 20*log10(farfield) + maxgain;
|
farfield = 20*log10(farfield) + maxgain - logscale;
|
||||||
ind = find(farfield<0);
|
ind = find(farfield<0);
|
||||||
farfield(ind)=0;
|
farfield(ind)=0;
|
||||||
else
|
else
|
||||||
maxgain = 0; % force 0 for linear plot
|
% force 0 for linear plot
|
||||||
|
logscale = 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
t = thetaRange*pi/180;
|
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']);
|
fprintf(fid,['SCALARS gain double 1\nLOOKUP_TABLE default\n']);
|
||||||
fclose(fid);
|
fclose(fid);
|
||||||
dumpField = farfield(:) + maxgain;
|
dumpField = farfield(:) + logscale;
|
||||||
save('-ascii','-append',filename,'dumpField')
|
save('-ascii','-append',filename,'dumpField')
|
||||||
|
|
Loading…
Reference in New Issue