How to find the x value corresponding to the half of a curve?

Can anyone help out with the Matlab codes necessary to determine the a, b (y axis) and c (x axis) values in the following graph? Thanks.

Answers (1)

S - your signal; time1 - time.
[a,ia] = max(S);
l1 = [false;diff(S(1:ia)) < 1];
ib = find(l1,1,'last');
b = S(ib);
Csig = (a+b)/2;
Sab = S(ib:ia);
t = time1(ib:ia);
ii = find(Sab < Csig,1,'last');
C = interp1(Sab([ii,ii+1]),t([ii,ii+1]),Csig);

Categories

Find more on Curve Fitting Toolbox in Help Center and File Exchange

Asked:

Ana
on 21 Nov 2013

Answered:

on 21 Nov 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!