SourceForge has been redesigned. Learn more.
Close

[dbf0ef]: / comp / comp_cellcoef2tf.m  Maximize  Restore  History

Download this file

16 lines (14 with data), 465 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
function coef = comp_cellcoef2tf(coef,dim)
%COMP_CELLCOEF2TF Cell to a tf-layout
% Usage: coef = comp_cellcoef2tf(coef,dim)
%
coefLenMax = max(cellfun(@(cEl)size(cEl,1),coef));
coefTmp = zeros(coefLenMax,numel(coef),size(coef{1},2),class(coef{1}));
for ii=1:numel(coef)
if size(coef{ii},1) == 1
coefTmp(:,ii) = coef{ii};
continue;
end
coefTmp(:,ii) = interp1(coef{ii},linspace(1,size(coef{ii},1),coefLenMax),'nearest');
end
coef = coefTmp';