from Power Spectrum Estimation (non-parameteric methods) by payam masoumi
there is a simple demo for non parameteric spectral estimation methods

ar_process(x)
function temp = ar_process(x)

global sigtype;
global ar_coef;
global vari;

sigtype = 3;
HH = findobj(gcf,'Tag','ar_a1');
p = str2num(get(HH,'String'));
if ~p
    ar_coef(1)=0;
else
    ar_coef(1)=p;
end;

HH = findobj(gcf,'Tag','ar_a2');
p = str2num(get(HH,'String'));
if ~p
    ar_coef(2)=0;
else
    ar_coef(2)=p;
end;

HH = findobj(gcf,'Tag','ar_a3');
p = str2num(get(HH,'String'));
if ~p
    ar_coef(3)=0;
else
    ar_coef(3)=p;
end;

HH = findobj(gcf,'Tag','ar_var');
p = str2num(get(HH,'String'));
if ~p
    vari=0;
else
    vari=p;
end;

Contact us at files@mathworks.com