Difference between revisions of "Korelácie"
From RoboWiki
Line 1: | Line 1: | ||
− | [http://www.dpmi.tugraz.at/schloegl/matlab/NaN/ The NaN-toolbox: A statistic-toolbox] for Octave and Matlab | + | [http://www.dpmi.tugraz.at/schloegl/matlab/NaN/ The NaN-toolbox: A statistic-toolbox] for Octave and Matlab which |
handles data with and without MISSING VALUES encoded as NaN's. | handles data with and without MISSING VALUES encoded as NaN's. | ||
Revision as of 12:57, 11 November 2008
The NaN-toolbox: A statistic-toolbox for Octave and Matlab which handles data with and without MISSING VALUES encoded as NaN's.
Data Set 1:
X = [4.4 5.5 4.2 3.0 4.5 4.9 4.6 5.0 4.7 5.1 4.4 4.1 4.9 4.7 5.0 4.6 3.6 4.9 5.1 4.8 5.2 5.2]'; Y = [12 14 18 35 23 29 16 12 18 21 27 13 19 22 20 16 27 21 13 18 17 11]'; scatter (x, y, [], sqrt(x.^2 + y.^2));
Data Set 2:
V = [5.8 7.3 5.6 4.0 6.0 6.5 6.2 6.6 6.3 6.8 5.8 5.5 6.5 6.3 6.6 6.1 4.8 6.5 6.8 6.4 6.9 6.9]'; T = [13 35 13 11 16 19 18 21 18 27 14 12 21 18 22 17 12 20 23 18 27 29]'; scatter (V, T, 5, sqrt(V.^2 + T.^2)); axis ([0 10 0 40]
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