I am trying to build a lookup table inside a for loop. A minimal example of what I would like to do is:
table= [ 1 2
n = 30;
Unfortunately, this doesn't work because table is seen as a temporary variable by the parfor loop. How can I solve this? Note, I cannot preallocate the vector doubles, because in the real problem n=1e40.
Thank you, Paolo