?? mwrgs_old.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 + -