"IceHaven " <firstname.lastname@example.org> wrote in message news:email@example.com... > Hi, > > I'm looking for a way to pass large arrays between functions without using > globals. I have a script that analyzes lots of data, and i want to create > a function that's sole purpose is to graph this data (and in turn > centralize what data is graphed and what isn't). > > I know that I can do this by making a ton of global arrays, but this is > obviously a dangerous solution. The other solution I can think of is > somehow passing the arrays to another workspace, then pulling that > workspace into the graphing function. I'm not sure how that would work > though. > > Is there a way to gather large arrays from different functions and scripts > without using globals? > > thanks!
Glad you don't care for the global data idea!
If you simply pass the arrays but don't alter them, a real copy is never made. However, a copy is always made to hold within plots. Since copies aren't made if the arrays aren't being updated, simply send your large arrays in as input arguments.