what is the difference between = and ==?

21 visualizaciones (últimos 30 días)
j90889088
j90889088 el 20 de Feb. de 2018
Editada: James Tursa el 21 de Feb. de 2018
what is the difference between = and == in coding?

Respuestas (1)

James Tursa
James Tursa el 21 de Feb. de 2018
Editada: James Tursa el 21 de Feb. de 2018
= 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

Categorías

Más información sobre MATLAB Report Generator en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by