what is the difference between = and ==?

조회 수: 34 (최근 30일)
j90889088
j90889088 2018년 2월 20일
편집: James Tursa 2018년 2월 21일
what is the difference between = and == in coding?

답변 (1개)

James Tursa
James Tursa 2018년 2월 21일
편집: James Tursa 2018년 2월 21일
= is used for an assignment
== is the element-wise equality comparison operator
A = B; % Assigns the value of B to the variable A
A == B % The result of comparing the elements of A to B for equality

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by