24小时热门版块排行榜    

查看: 357  |  回复: 0

dead5845065

金虫 (正式写手)

[求助] matlab 并行求救

大家好,

我正在做一个matlab数据匹配的计算,由于数据量太大,所以想使用并行,但是错误无法避免:

>> matlabpool local 6
Starting matlabpool using the 'local' profile ... connected to 6 labs.
>> untitled
Warning: The temporary variable j will be cleared at the beginning of each iteration of the parfor loop.
Any value assigned to it before the loop will be lost.  If j is used before it is assigned in
the parfor loop, a runtime error will occur.
See Parallel for Loops in MATLAB, "Temporary Variables".
> In untitled at 2
Error using untitled (line 2)
Error: The variable felspar in a parfor cannot be classified.
See Parallel for Loops in MATLAB, "Overview".

下面是我的代码,非常感谢!
alldata(300000,125), alldatafel(56927,54)
--------------------------------------------------------------------------------------
j=1;
parfor i=1:300000
    while j < 56927
        if strcmp(alldata(i,1),alldatafel(j,1)) && strcmp(alldata(i,2),alldatafel(j,2));
            felspar(j,55:179)=alldata(i,1:125);
           j=j+1;
           
        end
    end
end
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

找到一些相关的精华帖子,希望有用哦~

科研从小木虫开始,人人为我,我为人人
相关版块跳转 我要订阅楼主 dead5845065 的主题更新
信息提示
请填处理意见