getrep.m
来自「这是在网上下的一个东东」· M 代码 · 共 51 行
M
51 行
% getrep%% [f,weight]=getrep(kernfn,t,xsample,tsample,params);%% This routine will create an array of discretized representers; it% will call the user-supplied kernel function% f=getrep(kernfn,xsample,tsample,params);%% Inputs% kernfn name of matlab function that calculates the% value of the kernel % This function is called with the% following command:% y=kernfn(xx,tt,params)% t array containing time values% xsample array containing sampling locations% tsample time of sampling% params array of all parameters values%% Outputs% f representersfunction f=getrep(kernfn,t,xsample,tsample,params);ns=size(xsample,2);nt=size(t,2);weight=t(2)-t(1);v=params(1);D=params(2);f=zeros(ns,nt);for i=1:nt for j=1:ns if (t(i) <= tsample) ... f(j,i)=weight*... feval(kernfn,xsample(j),tsample-t(i),params); end end % for jend % for ireturn
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?