what does ~ do in this code?

조회 수: 10 (최근 30일)
John Fulginiti
John Fulginiti 2019년 11월 4일
답변: Star Strider 2019년 11월 4일
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일
The tilde ~ tells rref not to return the first output.
See: MATLAB Operators and Special Characters for details on it and other special characters.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by