function rqaQuick(dat, label)
% enter the data as a signle vector of numbers (dat). The label is a cell
% that contains the tick values of the plot. For instance, to run the
% recurrence for "bluesuede", the data would convert each letter into a
% number (dat = [0 1 2 3 4 2 3 5 3];) and the label would be a cell with
% each cell representing each letter
% (label = 'bluesuede';). The plot is saved into
% this directory as a JPEG with the name rqaQuickPlot.jpg


if nargin<1
    dat = input('input string of numbers: ');
end

rp = crp(dat, dat, 1, 1, .0001, 'nonormalize', 'silent');

[v j] = find(rp==1); %find the recurrent points
figure(1);
p1 = plot(v,j,'k.', 'markersize',30); %plot the indices in black dots
set(gca,'FontSize',20)

%get axes
xmax=get(gca,'xlim');
ymax=get(gca,'ylim');

axis([xmax(1)-1 xmax(2)+1 ymax(1)-1 ymax(2)+1]);
set(gca,'XTick',1:length(dat));
set(gca,'YTick',1:length(dat));

if nargin == 2
    for i = 1:length(label)
        lab{i} = label(i);
    end
    set(gca,'XTickLabel', lab);
    set(gca,'YTickLabel', lab);
end

axis([xmax(1) xmax(2) ymax(1) ymax(2)]);

saveas(p1, 'rqaQuickPlot.jpg');
save('rqaQuickData','dat','label','lab');

disp('finished');