function regresplot(x, y, y1, y2, yerr, mdlname)   
%	regresplot(x, y, y1, y2, yerr, mdlname) show regression data
%
% x          (M x N)   real values of independent variables
% y, y1, y2  (M x 1)   real values of a dependent variable
% yerr, mdlname        error amd model name to display   
%
% http://strijov.com

n = nargin;
%figure;

plot(x,y,'r-'); 
legend('Measure data');
        
if n > 2,
    hold('on');
    plot(x,y1,'b-');
    legend('Measure data','Regression');
end;

if n > 3,
    if ~isempty(y2), 
        plot(x,y2,'g-');
        legend('Measure data','Regression','Default');
    end;
end;

if n > 4, title(sprintf('Approximation error=%d', yerr)); end;
if n > 5, title(sprintf('Error=%d, model: %s', yerr, mdlname)); end;

xlabel('x');
ylabel('y');
hold('off');
drawnow;

return