![](/images/new-backgrounds/1012827/1282747x1.webp)
aPPendix d: MatLaB saMPLe code
%Add high and low bytes of Rotational Correction Factor together and check if positive or negative correction factor.
RotationalCorr(i)=temp(5)*256+temp(4); if RotationalCorr(i)>32768
End
%Scale Rotational Correction Factor by Diving by 100. RotationalCorr(i)=RotationalCorr(i)/100;
%Add high and low bytes of remaining 2 Byte Correction Factors together and check if positive or negative correction factor, if necessary. Scale dimensions in mm to cm by Diving by 10. Scale Focal Slope by Dividing by 10.
DistanceCorr(i)=(temp(7)*256+temp(6))/10;
DistanceCorrX(i)=(temp1(2)*256+temp1(1))/10;
DistanceCorrY(i)=(temp1(4)*256+temp1(3))/10;
VerticalOffset(i)=(temp1(6)*256+temp1(5))/10;
HorizonOffset(i)=(temp2(1)*256+temp1(7)); if HorizonOffset(i)>32768
end HorizonOffset(i)=HorizonOffset(i)/10; FocalDist(i)=temp2(3)*256+temp2(2); if FocalDist(i)>32768
end FocalDist(i)=FocalDist(i)/10; FocalSlope(i)=temp2(5)*256+temp2(4); if FocalSlope(i)>32768
end FocalSlope(i)=FocalSlope(i)/10;
% Maximum and Minimum Intensity only 1 Byte each. MinIntensity(i)=temp2(6); MaxIntensity(i)=temp2(7);
End
%Done with correction factors.
%Get Unit Parameter Data s=Ind(1)
[ 21 ]