Page 1 of 1

Computing Laminarity

Posted: Wed Feb 19, 2014 12:39
by holistic
Hi,

I have 10 timeseries and I want to compute the Lamniarity for all of those without using the gui-interface. Unfortunately I don't know how the commands are to save to compute the crp and the LAM and save it into an array. Can anybody help me out with which matlab code to use?

Re: Computing Laminarity

Posted: Wed Feb 19, 2014 21:51
by Norbert
There are different ways, depending whether the time series are in files or are already in your Matlab workspace. Let's start simple and assume your time series are the columns of an array:

x = [x1, x2, x3, … x10];
size(x) gives something like N, 10, where N is the length of your time series.

Now you can use

Code: Select all

for i = 1:10
   Rtemp = crqa(x(:,i),m,t,e,'silent');
   LAM(i) = Rtemp(6);
end
(where m and t are the embedding parameters and e the recurrence threshold which you have to chose)

In case you need the time resolved values, i.e., applying moving windows, simply use

Code: Select all

for i = 1:10
   Rtemp = crqa(x(:,i),m,t,e,w,ws,'silent');
   LAM(:,i) = Rtemp(:,6);
end
(where w and ws are window size and window step)