?? recurse_other.m
字號:
function [err_value] = recurse_other(position, theta_input_vector, snr)% This function recursively finds out the ber of bits in positions i_{1} % to i_{n-1}n=length(theta_input_vector);if(n>1) theta_output_vector1=zeros(n-1,1); theta_output_vector2=zeros(n-1,1);end;if(n>1) if( position<n+1) alpha=theta_input_vector(n-1)+theta_input_vector(n); beta=theta_input_vector(n-1)-theta_input_vector(n); if (n > 2) for i=1:n-2 theta_output_vector1(i,1)=theta_input_vector(i); theta_output_vector2(i,1)=theta_input_vector(i); end; end; theta_output_vector1(n-1,1)=alpha; theta_output_vector2(n-1,1)=beta; theta_output_vector1; theta_output_vector2; position; snr; err_value=0.5*recurse_other(position, theta_output_vector1, snr)+0.5*recurse_other(position, theta_output_vector2, snr); else err_value=lsb_error_new(theta_input_vector, 1/(snr*snr)); end;elseif( n==1 ) if(position == 1) err_value = 0.5*erfc(sin(theta_input_vector(1))/snr); elseif(position == 2) err_value= 0.5*erfc(cos(theta_input_vector(1))/snr); end; end;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -