Innerjoin when a table contains user-defined objects
Mostrar comentarios más antiguos
I have two tables that I wish to innerjoin() according to the topThick and botThick columns, which are the same in both tables. Why does this fail when Tright contains a column with objects of a user-defined class (here, myclass)?
load testdata
Tleft, Tright
innerjoin(Tleft, Tright)
Respuesta aceptada
Más respuestas (1)
4 comentarios
Paul
hace alrededor de 1 hora
Why not modify the class definition to accept zero arguments in the constructor, if you don't mind me asking?
Paul
hace alrededor de 5 horas
One possbility to avoid the need to create two temporary tables would be to use dbstack in the zero-argument call to the myclass constructor and take appropriate action if innerjoin is in the stack and error otherwise.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!