%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Run Mass Spectrograph Learing Programs with LSTM
% Network.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  load dataset
%
%rng('default')
rng(5);
warning('off');
plt_cnt = 4;            % Number of spectra to plot

[ds, cnt, dist] = load_dataset('Prostrate');

% pick plt_cnt indices at random

perm = randperm(cnt, plt_cnt);

close all;

% Plot spectrums

%%{
figure();
j = 1;
for i = 1:plt_cnt
    [s, l] = read_spectrum(ds, perm(i));
    subplot(plt_cnt, 2, j);
    plot_spectrum(s, l);
    j = j + 1;

    subplot(plt_cnt, 2, j);
    plot_spectrum(s, l);
    j = j + 1;
    xlim([xl xu]);
end

