How can I use the Modified Gram Schmidt code below
이전 댓글 표시
function [Q,R]=mgs(A)
[m,n]=size(A);
V=A;
Q=zeros(m,n);
R=zeros(n,n);
for i=1:n
R(i,i)=norm(V(:,i));
Q(:,i)=V(:,i)/R(i,i);
for j=i+1:n
R(i,j)=Q(:,i)'*V(:,j);
V(:,j)=V(:,j)-R(i,j)*Q(:,i);
end
end
to nu- merically orthogonalize basis functions 1, x, x2, x3, x4, · · · , xn on interval [−1, 1]. In dis- crete sense, those basis functions can be sampled on m equally spaced points on [−1, 1]. and to plot resulting orthogonalized basis on [−1, 1].
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Time-Domain Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!