📄 mfbox_transgrid.m
字号:
function newdata=mfbox_transgrid(oldgrid,olddata,newgrid)% newdata=mfbox_transgrid(oldgrid,olddata,newgrid)%% Copyright by Peter Gruber% Signal Processing & Information Theory group% Institute of Biophysics, University of Regensburg, Germany% Homepage: http://research.fabian.theis.name% http://www-aglang.uni-regensburg.de%% This file is free software, subject to the % GNU GENERAL PUBLIC LICENSE, see gpl.txt%[r,s] = min(repmat(sum(d.^2,2),1,size(c,1))-2*d*c'+repmat(sum(c.^2,2)',size(d,1),1));% very quick, very dirty[m,v,e] = mfbox_voronoimap(newgrid',oldgrid');[n,w,f] = mfbox_voronoimap(oldgrid',newgrid');newdata = olddata(m);if (length(unique(n))<length(n)) %average over candidates (TODO replace by accumarray) for i=1:length(newdata) p = find(n==i); if (length(p)>1) t = e{i}; if (min(t(:))>0) t = 1./sqrt(t(:)) newdata(i) = sum(olddata(p).*t)/sum(t(:)); end end endendreturn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -