Rev | Line | |
---|
[142] | 1 | %PR_DSET_ALIGN Align dataset w.r.t. categorical data
|
---|
| 2 | %
|
---|
| 3 | % [A,B, ...} = PR_DSET_ALIGN(A,B, ...)
|
---|
| 4 | %
|
---|
| 5 | % Align datasets (partially) based on categorical data. Without a call to
|
---|
| 6 | % this routine they might be coded differently.
|
---|
| 7 | %
|
---|
[150] | 8 | % SEE ALSO <a href="http://prtools.tudelft.nl/prtools/">PRTools Guide</a>
|
---|
[142] | 9 | % DATASETS, SETFEATDOM, FEATTYPES, DSET2CELL, CELL2DSET
|
---|
| 10 |
|
---|
[150] | 11 | % Copyright: R.P.W. Duin
|
---|
[142] | 12 |
|
---|
| 13 | function varargout = pr_dset_align(varargin)
|
---|
| 14 |
|
---|
| 15 | varargout = cell(1,nargin);
|
---|
| 16 |
|
---|
| 17 | a = varargin{1};
|
---|
| 18 | isdataset(a);
|
---|
| 19 | m = zeros(1,nargin);
|
---|
| 20 | m(1) = size(a,1);
|
---|
| 21 |
|
---|
| 22 | for j=2:nargin
|
---|
| 23 | b = varargin{j};
|
---|
| 24 | a = [a;b];
|
---|
| 25 | m(j) = size(b,1);
|
---|
| 26 | end
|
---|
| 27 |
|
---|
| 28 | n = 1;
|
---|
| 29 | for j=1:nargin
|
---|
| 30 | b = a(n:sum(m(1:j)),:);
|
---|
| 31 | varargout{j} = setname(b,getname(varargin{j}));
|
---|
| 32 | n = n+m(j);
|
---|
| 33 | end
|
---|
| 34 |
|
---|
| 35 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.