Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

sigmoidplot.m 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. function [ax b]=sigmoidplot(X,Y,varargin)
  2. %
  3. Color='k';
  4. Marker='o';
  5. LineStyle='-';
  6. ax=gca;
  7. nbins=12;
  8. fit_func=@sig4;
  9. beta0=[0 1 mean(X) 1];
  10. TrialRange=95;
  11. utils.overridedefaults(who,varargin);
  12. ci=(100-TrialRange)/2;
  13. hold_stat=get(ax,'NextPlot');
  14. [b]=nlinfit(X,Y,fit_func,beta0);
  15. xq=prctile(X,[ci]);
  16. bins=linspace(xq,-xq,nbins);
  17. [n,ni]=histc(X,bins);
  18. muY=zeros(numel(bins)-1,1);
  19. seY=zeros(numel(bins)-1,1);
  20. for bx=1:numel(muY)
  21. muY(bx)=nanmean(Y(ni==bx));
  22. seY(bx)=stats.nanstderr(Y(ni==bx));
  23. end
  24. binc=(bins(1:end-1)+bins(2:end))/2;
  25. if ~strcmp(Marker,'none')
  26. he=errorplot(ax,binc, muY,seY);
  27. set(he(2),'Color',Color,'Marker',Marker,'LineStyle','none');
  28. set(he(1),'Color',Color);
  29. set(ax,'NextPlot','add');
  30. end
  31. xax=[min(X):0.1:max(X)];
  32. plot(ax, xax, sig4(b,xax) ,'Color',Color,'LineWidth',2,'LineStyle',LineStyle);
  33. set(ax,'NextPlot',hold_stat);