Page 1 of 1

how to calculate delayed JRP?

Posted: Fri Jun 11, 2010 12:08
by Nicky_Santoro
Hello,
I need to calculate joint probability of reccurence, so first I have to calculate delayed JRP. According to Norbert's article I have found, I have to calculate delayed reccurence matrix R[i+t,j+t]. My matlab code:

Code: Select all

d = 15;
S= zeros(N-d);
for i= 1 : N-d
    for j = 1 : N-d
        S(i+d,j+d) = sqrt(sum((x(i,:)-x(j,:)).^2,2));   ? 
    end
end
figure
imagesc(t(1:N-d), t(1:N-d), S < e)
For d = 0 it is correct, but I,m not sure how delayed RP should look. My next idea was based on this tutorial http://www.recurrence-plot.tk/rp-tutorial.php and example with Lorenz system. Can I simply shift the data to obtain delayed RP matrix?

Code: Select all

d = 15;
x1d = circshift(x1,d);
x2d = circshift(x2,d);

Sd = sqrt(sum( (x1d - x2d) .^ 2, 2 ));
Sd = reshape(Sd, N2, N2);

figure
imagesc(t(1:N2), t(1:N2), Sd < 2)
axis square
colormap([1 1 1;0 0 0])
xlabel('Time (sec)'), ylabel('Time (sec)')
Best regards

Re: how to calculate delayed JRP?

Posted: Sun Sep 19, 2010 22:11
by Norbert
Hello,

what you do is not a JRP but a CRP. For a JRP you have to calculate the RP for each system separately and then calculate the Hadamard product of these two RPs.

Moreover, as you use Matlab, you can use the CRP toolbox (just look for it with Google).

You can do the following:

Code: Select all

RP1 = crp(x1);
RP2 = crp(x2);
JRP = RP1 .* RP2;

imagesc(JRP)
For a delayed version:

Code: Select all

d = 15;
RP1 = crp(x1(1:end-d));
RP2 = crp(x2(d:end));
JRP = RP1 .* RP2;

imagesc(JRP)
Hope it helps.

Best regards
Norbert