SCM

SCM Repository

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

Annotation of /SplineFitBATMAN_MATLABcode/peakClickSpline.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 346 - (view) (download)

1 : jie 346 function [ppmx, x,y]=peakClickSpline(Xn,ppm,offset, flagmin, flagRatio)
2 :     % written 120213 Dr. Jie Hao, Imperial College London
3 :    
4 :     [n,m]=size(Xn);
5 :    
6 :     %click on peaks
7 :     [x,y,button] = ginput;
8 :     hold on
9 :     plot(x,y,'ro')
10 :    
11 :     clicks=length(x);
12 :     for i = 1:clicks
13 :     xy(:,i) = [x(i);y(i)];
14 :     end
15 :     t = 1:clicks;
16 :     ts = 1:0.1: clicks;
17 :     xys = spline(t,xy,ts);
18 :    
19 :     plot(xys(1,:),xys(2,:),'b-');
20 :     if flagRatio
21 :     ppmx = intersectSpecSplineRatio(Xn, offset, x, y, ppm);
22 :     else
23 :     ppmx = intersectSpecSpline(Xn, offset, x, y, ppm, flagmin, 0.0005, 0.001);
24 :     end
25 :    
26 :     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