function [predict]=pred(real,predict);


nach=length(real)-length(predict)+1;
kon=length(real);
real=real(nach:kon,1);
for ii=1:length(predict)
 error(ii)=abs((real(ii)-predict(ii))/predict(1,1))*100;
end
figure(1)
subplot(2,1,1)
plot(real,'--m','LineWidth',2)
hold on
plot(predict,'--c','LineWidth',2)
grid on
ylabel('Price','FontSize',14,'FontName','Times New Roman');

legend('real','data')

subplot(2,1,2)
plot(error,'--r','LineWidth',2)
xlabel('Time','FontSize',14,'FontName','Times New Roman');
ylabel('Error, %','FontSize',14,'FontName','Times New Roman');
grid on
legend('error')