At Mark 22: | ng was made optional |
On entry, | , |
or | , |
or | , |
or | and , |
or | and , |
or | and , |
or | and , |
or | and , |
or | or ‘U’, |
or | or ‘S’. |
On entry, | and the number of variables indicated by isx is not equal to nvar, |
or | and a diagonal element of is zero, |
or | and a diagonal element of for some is zero. |
Open in the MATLAB editor: g03db_example
function g03db_example fprintf('g03db example results\n\n'); x = [1.1314, 2.4596; 1.0986, 0.2624; 0.6419, -2.3026; 1.3350, -3.2189; 1.4110, 0.0953; 0.6419, -0.9163; 2.1163, 0.0000; 1.3350, -1.6094; 1.3610, -0.5108; 2.0541, 0.1823; 2.2083, -0.5108; 2.7344, 1.2809; 2.0412, 0.4700; 1.8718, -0.9163; 1.7405, -0.9163; 2.6101, 0.4700; 2.3224, 1.8563; 2.2192, 2.0669; 2.2618, 1.1314; 3.9853, 0.9163; 2.7600, 2.0281]; [n,m] = size(x); isx = ones(m,1,'int64'); nvar = int64(m); ing = ones(n,1,'int64'); ing(7:16) = int64(2); ing(17:n) = int64(3); ng = int64(3); % Compute covariance matrix [nig, gmean, det, gc, stat, df, sig, ifail] = ... g03da( ... x, isx, nvar, ing, ng); equal = 'U'; mode = 'Sample points'; nobs = int64(6); % Data from which to compute distances x = [1.6292, -0.9163; 2.5572, 1.6094; 2.5649, -0.2231; 0.9555, -2.3026; 3.4012, -2.3026; 3.0204, -0.2231]; % Compute distances [d, ifail] = g03db( ... equal, mode, gmean, gc, nobs, isx, x); mtitle = 'Distances'; matrix = 'General'; diag = ' '; [ifail] = x04ca( ... matrix, diag, d, mtitle);
g03db example results Distances 1 2 3 1 3.3393 0.7521 50.9283 2 20.7771 5.6559 0.0597 3 21.3631 4.8411 19.4978 4 0.7184 6.2803 124.7323 5 55.0003 88.8604 71.7852 6 36.1703 15.7849 15.7489