⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 recurse_other.m

📁 Hierarchical-QAM的程序
💻 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 + -