Elegant way to set cells of a table simular for ever
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Arne T
am 20 Aug. 2020
Beantwortet: Walter Roberson
am 20 Aug. 2020
Hey All,
I have a Tree structure from tables, so every cell of my Table can have infinitely many subtables.
My code need a possibility to "merch" cells in the Tree. So for example I could have on level 3 in my Tree structure two cells, what should be the same. The easy way would be to write a function, which set the one equal to the other every time they change. But that would be very inefficient, cause if I have more levels in the tree It would need much unnecessary storage if i have the same subtree multiple times.. So I want to aks, if there is a possibility to set this two cells to be the same for real. So that the pointer for both cells goes to the same position on the storage.
Thanks
Arne
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 20 Aug. 2020
Make your nodes into a handle class. handles are effectively pointers for this purpose.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!