Auswertung Experiment
Database tüddelei DBHanlder läuft gut für DIESE Datanbank struktur... App begonnen aber weit entfernt von gutem Stand
This commit is contained in:
37
Libs/boundedlines/catuneven/.gitignore
vendored
Normal file
37
Libs/boundedlines/catuneven/.gitignore
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# Compiled source #
|
||||
###################
|
||||
*.com
|
||||
*.class
|
||||
*.dll
|
||||
*.exe
|
||||
*.o
|
||||
*.so
|
||||
|
||||
# Packages #
|
||||
############
|
||||
# it's better to unpack these files and commit the raw source
|
||||
# git has its own built in compression methods
|
||||
*.7z
|
||||
*.dmg
|
||||
*.gz
|
||||
*.iso
|
||||
*.jar
|
||||
*.rar
|
||||
*.tar
|
||||
*.zip
|
||||
|
||||
# Logs and databases #
|
||||
######################
|
||||
*.log
|
||||
*.sql
|
||||
*.sqlite
|
||||
|
||||
# OS generated files #
|
||||
######################
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
57
Libs/boundedlines/catuneven/catuneven.m
Normal file
57
Libs/boundedlines/catuneven/catuneven.m
Normal file
@@ -0,0 +1,57 @@
|
||||
function b = catuneven(dim, padval, varargin)
|
||||
%CATUNEVEN Concatenate unequally-sized arrays, padding with a value
|
||||
%
|
||||
% This function is similar to cat, except it does not require the arrays to
|
||||
% be equally-sized along non-concatenated dimensions. Instead, all arrays
|
||||
% are padded to be equally-sized using the value specified.
|
||||
%
|
||||
% b = catuneven(dim, padval, a1, a2, ...)
|
||||
%
|
||||
% Input variables:
|
||||
%
|
||||
% dim: dimension along which to concatenate
|
||||
%
|
||||
% padval: value used as placeholder when arrays are expanded
|
||||
%
|
||||
% a#: arrays to be concatenated, numerical
|
||||
%
|
||||
% Output variables:
|
||||
%
|
||||
% b: concatenated array
|
||||
|
||||
% Copyright 2013 Kelly Kearney
|
||||
|
||||
ndim = max(cellfun(@ndims, varargin));
|
||||
ndim = max(ndim, dim);
|
||||
|
||||
for ii = 1:ndim
|
||||
sz(:,ii) = cellfun(@(x) size(x, ii), varargin);
|
||||
end
|
||||
maxsz = max(sz, [], 1);
|
||||
|
||||
nv = length(varargin);
|
||||
val = cell(size(varargin));
|
||||
for ii = 1:nv
|
||||
sztmp = maxsz;
|
||||
sztmp(dim) = sz(ii,dim);
|
||||
|
||||
idx = cell(ndim,1);
|
||||
[idx{:}] = ind2sub(sz(ii,:), 1:numel(varargin{ii}));
|
||||
|
||||
idxnew = sub2ind(sztmp, idx{:});
|
||||
|
||||
try
|
||||
val{ii} = ones(sztmp) * padval;
|
||||
catch
|
||||
val{ii} = repmat(padval, sztmp);
|
||||
end
|
||||
val{ii}(idxnew) = varargin{ii};
|
||||
|
||||
end
|
||||
|
||||
b = cat(dim, val{:});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user