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