Meaning of less/greater than in handle objects
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Daniel Dolan
el 17 de Sept. de 2020
Comentada: Daniel Dolan
el 17 de Sept. de 2020
What is the meaning of less/greater than in handle objects? Here is a simple example.
classdef SimpleHandle < handle
end
When I create and compare two objects:
a=SimpleHandle();
b=SimpleHandle();
a > b
the result is randomly true or false.
I understand the use of == versus isqual for handle objects, but the notion of greater/less than eludes me.
0 comentarios
Respuesta aceptada
Bruno Luong
el 17 de Sept. de 2020
I believe the graphic handle object at one point of MATLAB history (before R2014b?) is just a double numbers unique assigned too each object.
They are used to identify the object. Matlab later replace HANDLE with a real object, but keep comparison for compatibility.
Shouldn't worry about comparing them, it's meaningless operation.
2 comentarios
Walter Roberson
el 17 de Sept. de 2020
You can still double() any handle, and handle() any double (but the result might be an invalid handle.)
Más respuestas (0)
Ver también
Categorías
Más información sobre Interactive Control and Callbacks en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!