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.

findDP.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. function [Vout,Iout]=findDP(Xin,Yin,PRMin)
  2. if PRMin{1}==1 % finding deflection point
  3. if length(PRMin)<2
  4. DEG=3;
  5. else
  6. DEG=PRMin{2};
  7. end
  8. for k=1:size(Yin,1)
  9. Ytmp=Yin(k,:);
  10. Ytmp(~isfinite(Ytmp))=max(Ytmp(isfinite(Ytmp)));% dealing with nonnumeric values substituting with max
  11. YinF=filtfilt(0.1*ones(1,10),1,Ytmp);
  12. BB0=diff(YinF,DEG);
  13. CC=Xin;
  14. for p=1:DEG
  15. CC=CC(1:end-1)+diff(CC)/2;
  16. end
  17. BB=interp1(CC,BB0,Xin,'nearest','extrap');[Vout(k,1),Iout(k,1)]=min(BB);
  18. end
  19. elseif PRMin{1}==2 % finding threshold
  20. if length(PRMin)<2
  21. ALPHA=0.95;
  22. else
  23. ALPHA=PRMin{2};
  24. end
  25. for k=1:size(Yin,1)
  26. Ytmp=Yin(k,:);
  27. if ~isempty(find(isfinite(Ytmp),1))
  28. Ytmp(~isfinite(Ytmp))=max(Ytmp(isfinite(Ytmp)));% dealing with nonnumeric values substituting with max
  29. YinF=filtfilt(0.1*ones(1,10),1,Ytmp);
  30. [Vmin,qwe]=min(YinF);[Vmax,qwe]=max(YinF);Vtsh=Vmin+(1-ALPHA)*(Vmax-Vmin);
  31. Iout(k,1)=find(Yin(k,:)<=Vtsh,1,'first');Vout(k,1)=YinF(Iout(k,1));
  32. else
  33. Iout(k,1)=size(Yin,2);Vout(k,1)=NaN;
  34. end
  35. end
  36. end