 function Y = get_shm(t,var,C,K)

% function Y = get_shm(t,var,C,K)
%
% Replicates R. Smith, Uncertainty Quantification, Chapter 7

 if nargin<2, 
    var = .01;       % standard deviation of the noise
 end
 if nargin<3, 
    C = 1.5;          % true damping (mass = 1) 
 end
 if nargin<4
    K = 20.5;         % stiffness (mass = 1)
 end

 x0 = [2; 0];

 Y = 2*exp(C*t/2).*cos(sqrt(K-C^2/4)*t) + sqrt(var)*randn(size(t));
 
