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

📄 set_zforce.m

📁 迫零算法
💻 M
字号:
%this files set all global zforce variables, calls the functions%to simulate the zforce receiver, and calls plotting functions%global to fixed receiver algoithmsfunction[]=set_zforce();%call global varsglobal_zforce;ui_global_zforce;global_sys_params;global_fig;set(h_zforce_msg,'string','Ready to Simulate New Parameters!');drawnow;%Immediately find matrices----this may cause a waiting problem%Notice SNR is set to inf[zf_F,zf_delta,zf_M]=cdma_find_mmse(K_in+K_out,K_in,H_user,inf);%%%%%%%%%%%%%%%%%%%%%%Choose user and delay%%%%%%%%%%%%%%%%%%%%%zf_user=get(h_zforce_user,'value');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%either choose optimal delay, or user specified%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%delay_type=get(h_zforce_delay,'value');if delay_type==1  zf_delay=zf_delta(zf_user)-(zf_user-1)*N_s;else  zf_delay=delay_type-2;end;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Get trace color%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%color=ui_color(get(h_zforce_col,'value'));%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%simulate %%%%%%%%%%%%%%%%%%%%%%%%%%%%%if get(h_zforce_sim,'value') set(h_zforce_msg,'string','Simulating....');drawnow; [zf_s_hat,zf_squer,zf_achv_BER]=cdma_mmse(zf_F,S,P,L,N_s,zf_user,zf_delay,R); str=['User ',num2str(zf_user),' at delay ',num2str(zf_delay), '(ZForce)']; plot_error(zf_user,zf_delay,zf_squer,color,str); zf_achv_MSE=mean(zf_squer); set(h_zforce_msg,'string','Simulation complete');drawnow; %%%%%%%%%%%%%%%%%%%%%%%%%%%%% %display output %%%%%%%%%%%%%%%%%%%%%%%%%%%% set(h_zforce_achv_MSE,'string',num2str(10*log10(zf_achv_MSE),'%2.1d')); set(h_zforce_achv_BER,'string',num2str(zf_achv_BER,'%1.1d')); set(h_zforce_const,'enable','on')end;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%plot constellation and eye diagram%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if get(h_zforce_const,'Value')  plot_const(zf_s_hat(N_s:length(zf_s_hat)));else  if ishandle(fig_const), delete(fig_const); end;end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -