필터 지우기
필터 지우기

unary operator

조회 수: 7 (최근 30일)
Tor Fredrik Hove
Tor Fredrik Hove 2011년 10월 14일
why is 3>5 unary when exposed to ~ (sign for not) you have two numbers 3>5 and binary is defined as:
An operation, such as addition, that is applied to two elements of a set to produce a third element of the set.
while unary is defined as:
A mathematical operation, such as the square root function and complex conjugation, that requires only one operand.
here for 3>5 you do need to numbers to make false statement true and vica versa

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 10월 14일
I think it is like this:
x=3>5 is binary as it is the same as x=gt(3,5)
3>5 is unary when exposed to ~
y=~x, or y=~(3>5) or y=not(x)

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by