在MATLAB中给定向量集的情况下,如何获得最大独立向量? [英] how to get the maximally independent vectors given a set of vectors in MATLAB?

查看:98
本文介绍了在MATLAB中给定向量集的情况下,如何获得最大独立向量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果给我一组向量(它们可以作为矩阵的列向量提供),并且我想获得最大独立向量,那么最好的解决方法是什么?

If I am given a set of vectors (they can be provided as the column vectors of a matrix), and I want to get the maximally independent vectors, what is the best way to go about it?

我可以一次将一个向量添加到结果集中,以查看新形成的矩阵的秩是否增加.但是我觉得它不是很有效.当然,我可以回去做高斯消去法来解决这个问题.但是我只是想知道是否有更好的方法(有效且数值稳定且粗糙)解决这个问题.

I could add one vector to the result set at a time to see if the rank of the newly formed matrix is increased or not. But I feel it is not very efficient. Of course, I could go back to do Gauss elimination to work this out. But I am just wondering if there is a better (efficient and numerically stable and robut) approach to this problem.

谢谢.

修改

通过观看等级增加来感觉加法可能是无效的.我们可以通过观察排名是否在降低来进行删除.

Feel the addition by watching the rank increasing is probably not valid. We can do deletion by watching if the rank is decreasing though.

推荐答案

[U,S,V]=svd(vectors);
U(1:size(vectors,1),1:size(vectors,2))=vectors;

U现在包含原始向量以及一个最佳正交集.

U now contains the original vectors plus an optimally orthogonal set.

这篇关于在MATLAB中给定向量集的情况下,如何获得最大独立向量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆