Using Globals instead of passing large arrays in Matlab

前端 未结 2 785
时光说笑
时光说笑 2021-01-20 22:31

I am using large arrays (about 70 MB each) and am worried about passing them to functions. My understanding is Matlab uses pass-by-value function arguments, making local cop

2条回答
  •  佛祖请我去吃肉
    2021-01-20 23:27

    @mutzmatron answered my question in a comment, so this is a repost:

    Actually Matlab passes by reference, unless it decides it needs to pass by value...see the explanation here: http://www.mathworks.com/matlabcentral/answers/...

提交回复
热议问题