parfor error in fucntion call

I am executing the following code
function batch_rtokada
...
parfor k=1:N
[l(k) L2(k) S(k) Mo(k) M(k) V(k)]=rtokada(w,out,run,ID(k),sta,l(k),G,GSF);
end
and receive the following error
Error using parallel_function (line 589)
Undefined function or variable 'G'.
Error stack:
batch_rtokada>(parfor body) at 36
Error in batch_rtokada (line 35)
parfor k=1:N
But the variable G has been laoded before and indeed exists and does not change in the loop it's always the same for every call to rtokada()
Help?

Answers (1)

Image Analyst
Image Analyst on 6 Feb 2013
Set a breakpoing on line 589. When it stops there, type G onto the command line. Then tell me what you see. What is G? Is it a double array? An integer scalar? A string? A structure? A cell array? What in the heck is it???

Categories

Tags

Asked:

on 6 Feb 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!