1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-08 23:20:12 +00:00

26 lines
643 B
Mathematica
Raw Normal View History

2018-03-30 12:04:14 +02:00
function result = clsin(ar, degree, argument)
% Clenshaw summation of sinus of argument.
%
% result = clsin(ar, degree, argument);
% GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
% This file is part of GNSS-SDR.
%
% SPDX-FileCopyrightText: Kai Borre
% SPDX-License-Identifier: GPL-3.0-or-later
2018-03-30 12:04:14 +02:00
%==========================================================================
cos_arg = 2 * cos(argument);
hr1 = 0;
hr = 0;
for t = degree : -1 : 1
hr2 = hr1;
hr1 = hr;
hr = ar(t) + cos_arg*hr1 - hr2;
end
2018-03-30 11:36:50 +02:00
result = hr * sin(argument);
2018-03-30 12:04:14 +02:00
%%%%%%%%%%%%%%%%%%%%%%% end clsin.m %%%%%%%%%%%%%%%%%%%%%