glnodewt.m

来自「This GUI can be used by entering nu at t」· M 代码 · 共 13 行

M
13
字号
function [x,w] = GLNodeWt(ord)
%Nodes and weights found by solving an eigenvalue problem%

%   x = vector of nodes     %
%   w = vector of weights   %
%   ord = Order of quadrature rule  %

beta = (1:ord-1)./sqrt(4*(1:ord-1).^2-1);
J    = diag(beta,-1) + diag(beta,1);
[V,D]= eig(J);
[x,ix]= sort(diag(D));
w    = 2*V(1,ix)'.^2;

⌨️ 快捷键说明

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