what does ~ do in this code?

I was given a couple lines of code for part of a project and im trying to figure out how it does what it does.
[~,pivot]=rref(A)
B=A(:,pivot)
The code is given a matrix A, and matrix B is a matrix of just the pivot columns of A.
my main confusion is around the first line, with the ~ operator. In most cases i've seen, ~ indicates "not", but here it seems to be doing something different

回答 (1 件)

Star Strider
Star Strider 2019 年 11 月 4 日

1 投票

The tilde ~ tells rref not to return the first output.
See: MATLAB Operators and Special Characters for details on it and other special characters.

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

タグ

質問済み:

2019 年 11 月 4 日

回答済み:

2019 年 11 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by