From: sbk kunwar on 9 Jul 2010 21:32 hi, I am new to matlab and so i do not know about the codes. I have been trying to make a qq-plot as i am working on extreme value theory. I found the codes online, but there is a problem with this code. data=surecol(data); line=1; if nargin < 2, error('Data and xi inputs should be supplied at least'); elseif nargin == 3, error('One of ltrim and rtrim inputs should be defined, the other should be left undefined and entered as ''[ ]'''); elseif nargin == 4, if ~isempty(ltrim)&&~isempty(rtrim), error('One of ltrim and rtrim inputs should be defined, the other should be left undefined and entered as ''[ ]'''); end if ~isempty(ltrim) && isempty(rtrim) data=data(data<=ltrim); elseif ~isempty(rtrim) && isempty(ltrim), data=data(data>=rtrim); else error('One of ltrim and rtrim inputs should be defined, the other should be left undefined and entered as ''[ ]'''); end else end if xi==0, ylab='Exponential Quantiles'; y= expinv(ppoints(data),1); end if xi~=0, ylab=['GPD Quantiles; xi=' num2str(xi)]; y=qgpd(ppoints(data),xi); end plot(sort(data),y,'.'); if line==1, hold on, x=sort(data); b=regress(y',[ones(size(x)) x]); plot([(1/b(2))*(max(y)-b(1));(1/b(2))*(min(y)-b(1))],[max(y);min(y)],'k'); scx=range(x)/20;scy=range(y)/20; axis([min(x)-scx max(x)+scx min(y)-scy max(y)+scy]); hold off end ylabel(ylab); xlabel('Ordered Data'); I always get the error message saying "??? Undefined function or method 'expinv' for input arguments of type 'double'." or "??? Undefined function or method 'regress' for input arguments of type 'double'." Can anyone please tell me how i correct. please help me!!
From: Maxx Chatsko on 9 Jul 2010 22:15 "sbk kunwar" <samratkunwar(a)hotmail.com> The inputs into 'expinv and 'regress' have to be the same size. expinv http://www.mathworks.com/access/helpdesk/help/toolbox/stats/expinv.html regress http://www.mathworks.com/access/helpdesk/help/toolbox/stats/regress.html Maxx
|
Pages: 1 Prev: Find minimum and maximum points of a spline Next: Is the newfftd function deployable..... |