matlab中orth有什么用,Orthonormal basis for range of symbolic matrix

Compute Orthonormal Basis

Compute an orthonormal basis of the range of this matrix. Because

these numbers are not symbolic objects, you get floating-point results.

A = [2 -3 -1; 1 1 -1; 0 1 -1];

B = orth(A)

B =

-0.9859 -0.1195 0.1168

0.0290 -0.8108 -0.5846

0.1646 -0.5729 0.8029

Now, convert this matrix to a symbolic object, and compute an orthonormal basis:

A = sym([2 -3 -1; 1 1 -1; 0 1 -1]);

B = orth(A)

B =

[ (2*5^(1/2))/5, -6^(1/2)/6, -(2^(1/2)*15^(1/2))/30]

[ 5^(1/2)/5, 6^(1/2)/3, (2^(1/2)*15^(1/2))/15]

[ 0, 6^(1/2)/6, -(2^(1/2)*15^(1/2))/6]

You can use double to convert this result to the

double-precision numeric form. The resulting matrix differs from the matrix returned by the

MATLAB®

orth function because these functions use different versions of the

Gram-Schmidt orthogonalization algorithm:

double(B)

ans =

0.8944 -0.4082 -0.1826

0.4472 0.8165 0.3651

0 0.4082 -0.9129

Verify that B'*B = I, where I is the identity

matrix:

B'*B

ans =

[ 1, 0, 0]

[ 0, 1, 0]

[ 0, 0, 1]

Now, verify that the 2-norm of each column of B is 1:

norm(B(:, 1))

norm(B(:, 2))

norm(B(:, 3))

ans =

1

ans =

1

ans =

1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值