Fig_3d.m 2.4 KB

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