wip.m

来自「LiScNLS is a Matlab application for the 」· M 代码 · 共 11 行

M
11
字号
function I=wip(f,g,wipr,wint,dom)
% f: q columns and g: p columns, representing values of 
%    some q respectively p functions at the Legendre grid
% wipr: weight column of the inner product - values at the Legendre grid
% wint: Gauss quadrature weights
% dom: working interval
% I: p rows and q columns, represents the weighted inner product of f by g 
[m,q]=size(f);[n,p]=size(g);
if n~=m disp('n~=m');return;end;
gg=repmat(wint'.*wipr,[1,p]).*g;
I=(dom(2)-dom(1))/2*(f'*gg)';

⌨️ 快捷键说明

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