I have the following matrix: M = [3 18 0;-3 -2 5;-1 5 0;3 3 -9]
I need to find a vector that's orthogonal to all of the vectors in this matrix. I'm familiar with how to solve for a vector that's orthogonal to two vectors (solving for lambda and multiplying lambda by a vector), but not sure how to solve for multiple vectors. Any help is appreciated!

 採用された回答

John D'Errico
John D'Errico 2021 年 2 月 16 日

0 投票

Never call a variable O. Consider how difficult it will be to find the bug one day, when you see or write a zero, instead of O. And consider that in some fonts, the difference between them is very slight.
As to the question, use null.
help null

3 件のコメント

Samuel Hoppen
Samuel Hoppen 2021 年 2 月 16 日
Thanks, John. How exactly would you suggest using null? I tried null(M) (renamed the matrix), along with a couple other options, and that didn't give me the correct vector.
James Tursa
James Tursa 2021 年 2 月 16 日
Why do you think null( ) did not give you the correct vector? What did it give you and what were you expecting differently?
Samuel Hoppen
Samuel Hoppen 2021 年 2 月 16 日
Null(M) gave me a 3×0 empty double matrix. If I then calculate the dot product of null(M) and M, I get an error because the size of the vectors is different.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by