y=dlmread('uaheur_nbu1290.txt');
%y=dlmread('sin.txt');
%y=dlmread('sp500new.txt');
x=0:240;
for i=0:0
    %y=sin((2*pi/(60-i))*x)+200*ones(1,length(x));
    n=length(y);
    nprognoz=350;
    global type_prirash;
    type_prirash=1;
    %yshito=test_skleyka(y,5,1);
    %title(strcat('slozhnaya, i=',int2str(40-i)));
    %yshito=test_skleyka(y,8,0);
    %title(strcat('prostaya, i=',int2str(40-i)));
end
y1=y(1:n-200);
global bif_flag;
bif_flag=1;
%bif_flag=[];
params=MarkovPrognozOptimize(y1);
%[yprognall,N1]=MarkovPrognozMain(y(1:n-1000));

figure;
plot(y,'r');
hold on;
plot(params,'b');
title('MainResults!'); 