I have written code that produces a graph giving the xcorr coeff of two stochastic electromyogram signals: sEMGL and sEMGbR. % x=(sEMGL); y=(sEMGbR); [c,lags]=xcorr(x,y,'coeff'); figure (8); plot (c,lags) % My question is how to write code in Editor so that in the command window I can type 'time lag =' to obtain this scalar value in milliseconds. A secondary question is to find the derivative of each signal in order to calculate the rate of change in each signal: to evaluate whether the time lag between the signals varies in relation to the rate of change in each signal.
Please help. Kind regards, Trudy