|
Kirk,
With the code as you've written it, I don't believe M-Lint would ever complain about this unless (a) you've left out some code between the parfor loops which does actually use the loop index and (b) you are using the variable "i", since "i" would still work as the complex function.
Which version of MATLAB are you using and can you verify that the loop variable is not being referenced between the parfor loops?
Raymond
"Kirk" <kwythers.nospam@umn.edu> wrote in message <h7ko1m$3ct$1@fred.mathworks.com>...
> I have a script that repeats several uses of "parfor" with diferent calls in each . I use the variable "i" several times. However I am getting the error:
>
> "The index variable "i" is used after the PARFOR loop, but it is unavailable after the loop"
>
> Any suggestions would be appreciated.
>
> My usage looks like:
>
> parfor i = 1:5
> some statements;
> end;
>
> parofor i = 1:5
> some other statments;
> end;
>
> I am getting a "red" warning. However the script does run correctly. Is this one of those times when one just need to suppress the m-lint error?
|