Info

此问题已关闭。 请重新打开它进行编辑或回答。

the variable can't be classified with parfor

1 次查看(过去 30 天)
I have large code and need fix the error of variable(perror) as can't be classified and I can summarized my code.
ind=1; indx =1; limit=4; % Opening the output file
fid=fopen('Parallel_k_n_L_test_16_6_2014.txt','wt');
parfor SNR=0:5
undetected_errors = 0;
SNR
frmerror=0;
bitnerr=0;
frames=0;
.
.
.
.
% Decoder ---------------
[success,kr,dd0,x_hat1]=turbo_decoder_infectious_no_int_z_9_6_2010(rcv,si,H1,co,fid,frames);
% ---------------------------------------------
dseq1=dd0;
% B E R ------------------
error=sum(abs(dseq1-b));
perror1=error/size(b,2);
perror(frames)=perror1; %(the problem here)
if error~=0
frmerror=frmerror+1
bitnerr=bitnerr+error;
if success == 1
undetected_errors = undetected_errors +1;
c_w(indx,:) = co;
noise_w(indx,:) = noise;
b_w(indx,:) = b;
kr_w(indx,:) = kr;
x_hat1_w(indx,:) = x_hat1;
indx = indx +1;
end
end
merror=mean(perror);
ferror(ind)=merror;
frmerr(ind)=frmerror;
ind=ind+1;
bits=frames*size(G1,1);
BER=bitnerr/bits
FER=frmerror/frames
end
fclose('all');
semilogy(SNR,BER);
the result un error as the variable perror can't be classified
so plz can anyone help me fix the problem me make other other variables and shall need matlabpool for high speed? also my program working well for.

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by