error in isempty function

0

I have an error in this function isempty in matlab, I need that when empty through an array make the following condition to if isempty :

function bn_hat = my_descodificador_Hamming_v2(rn,N,H_Ham,n_cyc,k_cyc,simb_alfa)

rn      = reshape(rn,n_cyc,N/k_cyc)';

bn_til      = rem(rn*H_Ham',2);

sn_til      = bi2de(bn_til,'right-msb')';
cn_hat      = rn';
pos         = find(sn_til>0);
pos_erro    = nansum(simb_alfa(sn_til(pos)),1);

if isempty(pos_erro,[])

    cn_hat(pos_erro+n_cyc*(pos-1)) =  not( cn_hat(pos_erro+n_cyc) );

end

bn_hat      = cn_hat(k_cyc:end,:)';
bn_hat      = reshape(bn_hat',1,[]);

The error you give me is as follows:

  

Eb / No = +0 dB :: errors = Error using isempty   Too many input arguments.

     

Error in my_descoder_Hamming_v2 (line 11)   if isempty (pos_erro, [])

     

Error in sim_FSK_incoerent (line 56)   bn_hat = my_descoder_Hamming_v2 (cn_hat, N, H_Ham, n_cyc, k_cyc, simb_alfa);

    
asked by anonymous 12.09.2017 / 23:01

1 answer

0

The isempty function accepts only one parameter, but in its code it has two.

If you use

if isempty(pos_erro) 

should resolve.

    
13.09.2017 / 22:06