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

📄 mwrgs_old.m

📁 MDPSAS工具箱是马里兰大学开发的
💻 M
字号:
function [psi] = mwrgs(f,w)% mwrgs.m A Gram-Schmidt ortho-normalization procedure. The discretized set%         of functions (phi) is made ortho-normal with with respect to the%         discretized weight function (w) over the unit domain to produce%         the set of functions (psi). Called as%%         [psi] = mwrgs(phi,w)%%        INPUT Variables: %                 phi : [: by m] array of m trial functions%                 w   : weight array from pd.m%%        OUTPUT Variables:%                 psi : ortho-normal result of phi w.r.t. w and the domain%%        EXAMPLE: Perform G.S. procedure on a series of function x^n where%                 n is an integer from 0 to 4 in the cylindrical domain.%                 The resulting functions (fct) are shown to be ortho-%                 normal using the weighted inner product function (wip.m).%%                 [x w] = pd('cyln',25);%                 fct   = mwrgs( gdf(x,'x.^n','x',{'n',[0:4]}), w );%                 wip(fct,fct,w)% Written by Raymond A. Adomaitis, Hsiao-Yung Chang, and Yi-hung Lin % as part of MWRtools, version 1.2.% Copyright (c) by Raymond A. Adomaitis, 1998, 1999, 2000[m n] = size(f);psi   = zeros(m,n);for i = 1 : n  v = f(:,i);  for j = 1 : i      v = v - wip(v,psi(:,j),w)*psi(:,j);  end  psi(:,i) = v/sqrt( wip(v,v,w) );end

⌨️ 快捷键说明

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