%korelace a RMSE, figures ziskane z funkce vizualizace
y = get(findobj(get(gca,'Parent'),'type','line'),'ydata'); %pri otevrenem fig.
x = get(findobj(get(gca,'Parent'),'type','line'),'xdata'); %pri otevrenem fig.

y1 = y{1,1}; % model
y2 = y{2,1}; % vzor

y2 = decimate(interp(double(y2),length(y1)),length(y2));

plot(y1)
hold on
plot(y2)

corrcoef(y1,y2)
corr2(y1,y2)
RMSE = sqrt(mean((y1 - y2)).^2)
