Korelácie

From RoboWiki
Revision as of 12:49, 11 November 2008 by Balogh (talk | contribs) (New page: Data: scatter (x, y, [], sqrt(x.^2 + y.^2)); '''scatterplotf.m''' <source lang="octave"> function ret=scatterplotf(x,y) [m,n]=size(y); if m==1, y=y'; x=x'; end dispmat=[...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Data:

scatter (x, y, [], sqrt(x.^2 + y.^2));


scatterplotf.m

function ret=scatterplotf(x,y)
  [m,n]=size(y);
  if m==1,
    y=y';
    x=x';
  end
  dispmat=[x y];
  n=size(dispmat,2);
  dispmat=sortrows(dispmat,1);
  x=dispmat(:,1);
  y=dispmat(:,2:n);
  plot(x,y);
endfunction