Do "pointers" exist in MATLAB? A question about the efficiency of using shorthands.
Show older comments
I'm not sure I'm using the right vocabulary, but here's what I mean.
Say I have data in this structure:
input.a.b.c.verylongname.thisistoolong.itmakesthecodehardtoread
This data will not be modified in the code I'm writing.
Say I create a shorthand:
muchsmaller = input.a.b.c.verylongname.thisistoolong.itmakesthecodehardtoread
and use that shorthand to access the data throughout the code.
Now, say that data is big. Will MATLAB actually create a copy of the data, using up memory, or will it use what I believe is called a "pointer" and simple point towards the same data regardless of the variable name I use?
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!