Skip to content

Instantly share code, notes, and snippets.

@randmized
Last active January 30, 2018 19:20
Show Gist options
  • Save randmized/3f43987df6a96921c0dcb1cfcd9a0e3f to your computer and use it in GitHub Desktop.
Save randmized/3f43987df6a96921c0dcb1cfcd9a0e3f to your computer and use it in GitHub Desktop.
task 8
## Copyright (C) 2018 martin
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
## -*- texinfo -*-
## @deftypefn {} {@var{retval} =} arma_qrs (@var{input1}, @var{input2})
##
## @seealso{}
## @end deftypefn
## Author: martin <martin@martin-fh>
## Created: 2018-01-29
function [output] = arma_qrs (M)
load param.mat; %param.mat laden
%M=500-1;
y_ = zeros(3,M);
z_m = zeros(M);
for n=1:3
for m=1:M-1
y_(n,m) = parameter(7,n) * exp((parameter(2,n)/parameter(1,n))*(1-cos(parameter(1,n)*m))) * cos(parameter(3,n)*parameter(1,n)*m+parameter(4,n));
%y_m[n1] = A * exp(b/lambda*(1-cos(lambda*m)))*cos(k*lambda*m*phi);
end
end
for n=1:3
for m=1:(M-parameter(5,n))
z_m(m)=z_m(m) + (parameter(6,n) * y_(n,m+parameter(5,n)))
end
end
%plot(y_(1,1:M));
%plot(y_(2,1:M));
%plot(y_(3,1:M));
plot(z_m(1:M));
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment