SCM

SCM Repository

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

View of /SplineFitBATMAN_MATLABcode/peakClickSpline.m

Parent Directory Parent Directory | Revision Log Revision Log


Revision 346 - (download) (annotate)
Tue Nov 11 03:01:17 2014 UTC (2 years, 4 months ago) by jie
File size: 526 byte(s)
matlab
function [ppmx, x,y]=peakClickSpline(Xn,ppm,offset, flagmin, flagRatio)
% written 120213 Dr. Jie Hao, Imperial College London

[n,m]=size(Xn);

%click on peaks
[x,y,button] = ginput;
hold on
plot(x,y,'ro')

clicks=length(x);
for i = 1:clicks
    xy(:,i) = [x(i);y(i)];
end
t = 1:clicks;
ts = 1:0.1: clicks;
xys = spline(t,xy,ts);

plot(xys(1,:),xys(2,:),'b-');
if flagRatio
    ppmx = intersectSpecSplineRatio(Xn, offset, x, y, ppm);
else
    ppmx = intersectSpecSpline(Xn, offset, x, y, ppm, flagmin, 0.0005, 0.001);
end

end

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge