Innerjoin when a table contains user-defined objects
이전 댓글 표시
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)
채택된 답변
추가 답변 (1개)
댓글 수: 4
Paul
대략 10시간 전
Why not modify the class definition to accept zero arguments in the constructor, if you don't mind me asking?
Paul
대략 1시간 전
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!