
%% Basic evaluation: plot the Smith Chart
fig=figure;

if isfield(dataStruct,'formattedReal'),
    RealPart=dataStruct.formattedReal;
    ImagPart=dataStruct.formattedImag;
else
    RealPart=dataStruct.Real;
    ImagPart=dataStruct.Imag;
end

[lineseries,hsm] = smithchart(RealPart+1i*ImagPart);
set(lineseries,'LineWidth',3);
set(hsm,'LineWidth',3,'LabelSize',18,'Color',[0 0 0]);

% To compare on the same plot with other data or theory stored in the
% complex variable AdditionalData
% hold on;
% plot(Real(AdditionalData),Imag(AdditionalData),'r--','Linewidth',3);
% hold off

% If you are saving data from Smith Chart format in the Network Analyser,
% you have also the field in the struct
% dataStruct.formattedReal
% dataStruct.formattedImag
% containing the user setting on the Electrical Delay and Phase Offset.
% To plot them use
% hold on;
% plot(dataStruct.formattedReal,dataStruct.formattedImag,'r--','Linewidth',3);
% hold off
%% End of plot the Smith Chart