There is a mistake in the extract58 data reading, which causes wrong plotting.
Instead of using "end-1" and "end" values to fill "measdata" and "x" values (((i.e. UFF.x = values(1:2:end-1);))), you should use "numpt" which is defined already as the number of measured data points.
This is neccessary in some uff recordings, as there are extra "zero" values at the end of the recorded data, which are not real measured data and used only to complete the columns and lines of UFF or UNV recording. Using "end" causes you to have these false data points.
See this:
*********************************
% Abscissa and ordinate values
if (ordDataType == 2 || ordDataType == 4)
% non-complex ordinate data
if spacingType == 0 % uneven abscissa
UFF.x = values(1:2:end-1);
UFF.measData = values(2:2:end);
else % even abscissa
UFF.measData = values;
nVal = length(UFF.measData);
UFF.x = UFF.xmin : UFF.dx : UFF.xmin + (nVal-1)*UFF.dx;
end
elseif (ordDataType == 5 || ordDataType == 6)
% complex ordinate data
if spacingType == 0 % uneven abscissa
UFF.measData = values(2:3:end-1) + j*values(3:3:end);
UFF.x = values(1:3:end-2);
else % even abscissa
UFF.measData = values(1:2:end-1) + j*values(2:2:end);
nVal = length(UFF.measData);
UFF.x = UFF.xmin : UFF.dx : UFF.xmin + (nVal-1)*UFF.dx;
end
else
errMessage = ['error reading measurement data at:' num2str(lineN)];
return
end
********************************
Guys,
I am trying to read a UFF58 data. I can only plot the "data description" part, but couldn't manage to plot the measurment data.
Can you give a hint please? Is it possible at all?
Thank you!
Great program, thanks.
it does not work to read a certain data type only with readuff.m . Please consider replacing:
if ~find(dsTypes==data_set_type)
by:
if dsTypes~=data_set_type
And moving:
dataSetN = dataSetN + 1;
just before:
UffDataSets{dataSetN} = ds_data;
Greatings
Comment only