⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getumat.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function uMat = getUMat(G,u)%% only used when USE_CPM2=1%% given the u_kt control points, and the splineVals associated% with them, apply a simple linear spline% to get a value at each of the G.numTaus 'fake time points'.%% if 'u' is not provided, gets it from G.u% want this flexibility when updating u parameter, for eg.function uMat = getUMat(G,u)%% too slow like this% if ~exist('u')%     u=G.u;% end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% use of a linear spline %%%%% just use linear interpolate between all the control pt. values%% for now, make it the same for each bin, might change lateruMat = zeros(G.numSamples,G.numTaus);for kk=1:G.numSamples        %% interpolate between cntrl pts using interp1q    xi = 1:G.numTaus;    x = G.cntrlPts;    %y2 = squeeze(u(kk,:));       %keyboard;    y = u(kk,:);    %if ~all(size(y)==size(y2))    %    keyboard;    %end    f = interp1q(x',y',xi');    uMat(kk,xi) = f;endreturn;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -