clc;
close all;


%%
%tisk grafu osy X
figure
plot(Xdata.time,Xdata.distance)
hold on;
plot(Xdata.time,Xdata.stav,'--r')
plot(Xdata.time,Xdata.regulator/10,'g')
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [s]') % x-axis label
ylabel('measured values') % y-axis label
title('Graf osy X')

%%
%tisk grafu osy X zm??eno csv
figure
plot(x_excel.time,x_excel.distance)
hold on;
plot(x_excel.time,x_excel.stav,'--r')
plot(x_excel.time,x_excel.regulator/10,'g')
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [ms]') % x-axis label
ylabel('measured values') % y-axis label
title('Graf osy X z CSV')

%%
%tisk grafu osy Y
figure
plot(Ydata.time,Ydata.distance,Ydata.time,Ydata.stav,Ydata.time,Ydata.regulator/10)
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [ms]') % x-axis label
ylabel('measured values') % y-axis label
title('Graf osy Y')


%%
%tisk grafu osy Y zm??eno csv
figure
plot(y_excel.time,y_excel.distance,y_excel.time,y_excel.stav,y_excel.time,y_excel.regulator/10)
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [ms]') % x-axis label
ylabel('measured values') % y-axis label
title('Graf osy Y z csv')


%%
%tisk grafu osy Z
figure
plot(Zdata.time,Zdata.distance,Zdata.time,Zdata.stav,Zdata.time,Zdata.regulator/10)
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [s]') % x-axis label
ylabel('measured values') % y-axis label
%title('Chart Z axis from OPC')


%%
%tisk grafu osy Z zm??eno csv
figure
plot(z_excel.time,z_excel.distance,z_excel.time,z_excel.stav,z_excel.time,z_excel.regulator/10)
legend('distance[mm]','stav[-]','regulator[-]')
xlabel('time [ms]') % x-axis label
ylabel('measured values') % y-axis label
%title('Graf osy Z z csv')


% %%
% %tisk celeho
% figure
% plot(Witt4_2_2015_3.time,Witt4_2_2015_3.signals.values(:,1),Witt4_2_2015_3.time,Witt4_2_2015_3.signals.values(:,2),Witt4_2_2015_3.time,Witt4_2_2015_3.signals.values(:,3))
% legend('x axis','y axis','z axis')
% title('Graf cele')
% 
% figure
% plot(Witt4_2_2015_3.time(1:400),Witt4_2_2015_3.signals.values(1:400,6))
% 
% title('Graf regulátor')