% Computing the sub coordinates @author Mazurek/Bartalsky Get the P_ij points out of the subcoordinates abs(M(i,x)-M(i,x+1))*(j/(m+1)) We will generate m-sub coordinates between the corresponding coordinates pair. % generateSubCoords.m parameters * *Input:* * _M_ ... parallel coordinates of a dataset * _m_ ... number of subCoordinates * *Ouput:* * _subCoords_ ... the computed sub Coords
0001 %% Computing the sub coordinates 0002 % @author Mazurek/Bartalsky 0003 % 0004 % Get the P_ij points out of the subcoordinates 0005 % abs(M(i,x)-M(i,x+1))*(j/(m+1)) 0006 % We will generate m-sub coordinates between the corresponding 0007 % coordinates pair. 0008 %% generateSubCoords.m parameters 0009 % 0010 % * *Input:* 0011 % * _M_ ... parallel coordinates of a dataset 0012 % * _m_ ... number of subCoordinates 0013 % * *Ouput:* 0014 % * _subCoords_ ... the computed sub Coords 0015 function [ subCoords ] = generateSubCoords(M,m) 0016 0017 rows = size(M,1); 0018 columns = size(M,2); 0019 0020 % We will assume, that the order of the subCoords is like: The first is 0021 % between 1 and 2, the second between 2 and 3, etc. 0022 0023 for x=1:(columns-1) 0024 subCoords(x).number = x; 0025 subCoords(x).subs = zeros(rows,m); 0026 for i=1:rows 0027 for j=1:m 0028 coordinate = 0; 0029 % compute 0030 coordinate = abs(M(i,x)-M(i,x+1))*(j/(m+1)); 0031 0032 if(M(i,x) > M(i,x+1)) 0033 coordinate = M(i,x) - coordinate; 0034 else 0035 coordinate = M(i,x) + coordinate; 0036 end 0037 0038 subCoords(x).subs(i,j) = coordinate; 0039 end 0040 end 0041 end 0042 0043 end 0044