SCM

SCM Repository

[batman] Annotation of /SplineFitBATMAN_MATLABcode/intersectSpecSpline.m
ViewVC logotype

Annotation of /SplineFitBATMAN_MATLABcode/intersectSpecSpline.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 346 - (view) (download)

1 : jie 346 function ppmx = intersectSpecSpline(Xn, offset, x, y, ppm, minflag, ppmerror)
2 :     % written 120213 Dr. Jie Hao, Imperial College London
3 :    
4 :     [n,m]=size(Xn);
5 :     offy=[0:n-1].*offset;
6 :     off = repmat(offy',1,m);
7 :     D = Xn + off;
8 :     [y iy]=sort(y);
9 :     x=x(iy);
10 :    
11 :     % ppmx = zeros(2,size(D,1));
12 :     ppmx = intersectSpecSplineRatio(Xn, offset, x, y, ppm);
13 :     for i = 1:size(ppmx,2)
14 :     ind = find(ppm>=ppmx(1,i)-ppmerror & ppm<= ppmx(1,i)+ppmerror);
15 :     if (~isempty(ind))
16 :     if minflag
17 :     [ny, nyi] = min(D(i,ind));
18 :     else
19 :     [ny, nyi] = max(D(i,ind));
20 :     end
21 :    
22 :     ppmx(1,i) = ppm(ind(nyi));
23 :     ppmx(2,i) = ny;
24 :     end
25 :     end

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge