Page 1 of 1

Basic Sin wave RP in matlab

Posted: Fri Aug 12, 2011 14:48
by ravitejadsp
Hello Guys,
I am very much new to RP, I read something about RP in this site. Now my doubt is following.

I have seen, A sin wave generates RP only diagonal lines. The code I have written in matlab generating cross diagonal lines. Once you check it. And please tell me where I am doing mistake?

Code: Select all

x=sin(2*pi*linspace(1,11,2000));

t=1:size(x);

N = length(x);
S = zeros(N, N);

for i = 1:N,
    S(:,i) = abs( repmat( x(i), N, 1 ) - x(:) );
end

%  imagesc(t, t, S)
%  axis square
thr=0.05;
imagesc(t, t, flipud(S) < thr)
axis square
colormap([1 1 1;0 0 0])
xlabel('Time'), ylabel('Time')
the above program is for thershold value (thr) = 0.05;

How to get the exact RP of sine wave?

Re: Basic Sin wave RP in matlab

Posted: Fri Oct 28, 2011 18:09
by sultornsanee
I recommend to use CRP toolbox. So you can get a right RP and RQA.

Re: Basic Sin wave RP in matlab

Posted: Fri Oct 28, 2011 21:45
by Norbert
The answer is that you have not embedded your time series. Without embedding you will similar dynamics in positive and negative time direction, i.e., x(i, i+1, i+2,...) = x(j, j-1, j-2, ...). This will cause diagonals perpendicular to the main diagonal. This should be explained in the Physics Reports paper as far as I remember.