The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: parfor error with valiable definition
Replies: 1   Last Post: Jul 7, 2014 3:11 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Edric Ellis

Posts: 721
Registered: 12/7/04
Re: parfor error with valiable definition
Posted: Jul 7, 2014 3:11 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Lyly_be <> writes:

> Hi every body, I have a problem regrading "parfor "command in Matlab.
> The error is : Error: The variable para in a parfor cannot be
> classified. See Parallel for Loops in MATLAB, "Overview".
> My program details is: I have parfor in a for loop and the parfor
> itself consists of some for commands. there are 3 variables that
> should be assigned in the parfor loop, and these variables have "cell"
> type. on index of these variables is related to the outer for, the
> other related to the parfor and the third one related to the inner
> for. I define the variable in before the parfor as a cell value. But
> I have the mentioned error again.

There are several possible reasons you might see that error, however it
should be possible to make it work. For example, the following works
fine (in R2014a, I didn't test any earlier releases):

x = cell(3,3,3)
for idx = 1:3
parfor jdx = 1:3
for kdx = 1:3
x{idx, jdx, kdx} = rand();

Any chance you could post some code that reproduces the problem you're
seeing? Also, which version of MATLAB are you using?



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.