Fig_3d.m~ 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. close all;
  2. res3={};
  3. fcol=figure;
  4. acclim=50;
  5. savename=['intrinsic_results_ns_res' num2str(acclim) '.mat'];
  6. load(savename,'-mat');
  7. types=fields(res2);
  8. for ty=1:numel(types)
  9. typ=types{ty};
  10. % vs={'pn','pm','cfm','cfc','cshm','cshst','cshp99','cshp95','cshp5','cshp1'};
  11. % for j=1:numel(vs)
  12. % eval([vs{j} '=nan*acclist;']);
  13. % end
  14. f1=figure
  15. gs=1;
  16. res=res2;
  17. autoc_step=.002;
  18. autoc_bins=1:300;
  19. bins=(autoc_bins)*autoc_step;
  20. phbins_norm=(pi/60:pi/60:5*pi)/2/pi;
  21. %%
  22. hold on;
  23. aux=nanmean(res.(typ).right);
  24. aux=aux/max(aux);
  25. fm=do_plot(bins,aux,[0 0 0],.5*[1 1 1]);
  26. aux=nanmean(res.(typ).left);
  27. aux=aux/max(aux);
  28. fc=do_plot(bins,aux,[1 0 0],[1 .5 .5]);
  29. aux=res.(typ).control2(1,:);
  30. aux=aux/max(aux);
  31. fneut=do_plot(bins,aux,[0 122 255]/255,[51 226 217]/255);
  32. subplot(2,2,1)
  33. set(gca,'XTick',0:.1:.6);
  34. axis([0 .3 0 1]);
  35. set(gca,'YTick',0:.5:2,'FontName','Arial');
  36. ss=subplot(2,2,2)
  37. set(gca,'XTick',0:.1:.6);
  38. axis([0.0 .2 0.25*[-1 1] ]);
  39. set(gca,'YTick',-.6:.2:.6,'FontName','Arial');
  40. title(typ);
  41. %%
  42. fsh=res.(typ).fcontrol2(:);
  43. %%
  44. subplot(2,2,4)
  45. fbins=6:.02:9;
  46. h=hist(fsh,fbins);
  47. h=h/sum(h);
  48. bar(fbins,h,'EdgeColor','none','FaceColor',[51 226 217]/255,'BarWidth',.8);
  49. gg=fit(fbins',h(:),'gauss1');
  50. hold on;
  51. p1=plot(gg);
  52. set(p1,'Color',[0 122 255]/255);%[.5 1 .5]-.5);
  53. legend off;
  54. mx=ceil(1.1*max(max(h),gg.a1));
  55. line(fm*[1 1],[0 mx],'LineWidth',2,'Color',[1 1 1]*0);
  56. line(fc*[1 1],[0 mx],'LineWidth',2,'Color',[1 0 0]);
  57. axis([7.3 9 0 0.3]);
  58. set(gca,'XTick',7:.5:10,'YTick',0:0.1:1);
  59. %%
  60. if ty<numel(types)
  61. figure(fcol)
  62. subplot(2,3,ty)
  63. h=hist(fsh,fbins);
  64. h=h/sum(h);
  65. bar(fbins,h,'EdgeColor','none','FaceColor',[51 226 217]/255,'BarWidth',1.0);
  66. gg=fit(fbins',h(:),'gauss1');
  67. hold on;
  68. p1=plot(gg);
  69. set(p1,'Color',[0 122 255]/255);
  70. legend off;
  71. mx=ceil(1.1*max(max(h),gg.a1));
  72. line(fm*[1 1],[0 mx],'LineWidth',1,'Color',[1 1 1]*0);
  73. line(fc*[1 1],[0 mx],'LineWidth',1,'Color',[1 0 0]);
  74. axis([7.3 9 0 0.3]);
  75. set(gca,'XTick',7:.5:9,'XTickLabel',{7,'',8,'',9});%,'YTick',0:0.5:1);
  76. else
  77. ylim([0 .5]);
  78. xlim([7.9 9])
  79. subplot(2,2,3)
  80. subplot(2,2,2)
  81. axis([.09 .15 -.05 .08])
  82. end
  83. end
  84. %%