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

📄 ui_ep.m

📁 基于Matlab
💻 M
字号:
% keep all variables local in scope
function [] = ui_ep();

% declare global variables
dfec_global; 
ui_private_global;

Lep=10000;
if get(h_ep,'Value')
   newparams;
   set(fig_menu,'HandleVisibility','on'); drawnow;
   set(h_msg,'BackgroundColor', [0 1 0]);
   set(h_msg,'FontAngle','italic', 'String','calculating EP...'); drawnow;
   set(fig_menu,'HandleVisibility','off'); drawnow;
   error_prop(Lep);
   SEREP=length(find(hard~=0))/length(hard);
   figure(fig_ep);
   clf

   if (real_source)
      nn=(1:Lep)';
      plot(nn,res,'rx',nn,hard,'go',nn,cnoise,'y'); hold on;
      legend('Soft Errors', 'Hard Errors',  'Colored Noise'); 
      plot(nn,res,'r--',nn,hard,'g:',nn,cnoise,'y'); hold off;
      xlabel('k');
      zoom xon;
      title(['Nf=' num2str(Nf) ', Nd=' num2str(Nd) ...
           ', \delta=' num2str(delta) ', SNR=' num2str(max(SNR))]);
   else
      nn=(1:Lep)';
      subplot(211);
      plot(nn,real(res),'rx',nn,real(hard),'go',nn,real(cnoise),'y'); 
      hold on;
      legend('Soft Errors', 'Hard Errors',  'Colored Noise'); 
      plot(nn,real(res),'r--',nn,real(hard),'g:',nn,real(cnoise),'y'); 
      hold off;
      xlabel('k');
      zoom xon;
      title(['Real part; Nf=' num2str(Nf) ', Nd=' num2str(Nd) ...
           ', \delta=' num2str(delta) ', SNR=' num2str(max(SNR))]);

      subplot(212);
      plot(nn,imag(res),'rx',nn,imag(hard),'go',nn,imag(cnoise),'y'); 
      hold on;
      legend('Soft Errors', 'Hard Errors',  'Colored Noise'); 
      plot(nn,imag(res),'r--', nn,imag(hard),'g:',nn,imag(cnoise),'y'); 
      hold off;
      xlabel('k');
      zoom xon;
      title('Imaginary part');

   end;


   set(fig_menu,'HandleVisibility','on'); drawnow;
   set(h_msg,'BackgroundColor', [0.8 0.8 0.8]);
   set(h_msg,'FontAngle','normal', 'String',''); drawnow;

else
   if ishandle(fig_ep), delete(fig_ep); end;
end;

⌨️ 快捷键说明

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