%% save_blocks_signal

clear

rng('default')                  % Set random number generator (rng)
rng(0);
% randn('state', 0);            % Command in old version of Matlab

N = 256;                        % N : signal length
s = MakeSignal('Blocks', N);    % s : noise-free signal
s = s(:);                       % convert to column 
noise = 0.5 * randn(N, 1);
y = s + noise;                  % y : noisy signal

% Save data
save -ascii blocks.txt s
save -ascii blocks_noisy.txt y
