what is the difference between = and ==?

回答 (1 件)

James Tursa
James Tursa 2018 年 2 月 21 日
編集済み: James Tursa 2018 年 2 月 21 日

5 投票

= 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

カテゴリ

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

タグ

質問済み:

2018 年 2 月 20 日

編集済み:

2018 年 2 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by