51 lines
1.2 KiB
Objective-C
Executable File
51 lines
1.2 KiB
Objective-C
Executable File
## Copyright (C) 2017 Jens Ahrensfeld
|
|
##
|
|
## 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 {Function File} {@var{retval} =} ltrack (@var{input1}, @var{input2})
|
|
##
|
|
## @seealso{}
|
|
## @end deftypefn
|
|
|
|
## Author: Jens Ahrensfeld <ahrensfeld@w2ess001vm>
|
|
## Created: 2017-05-29
|
|
|
|
function ltrack (d)
|
|
|
|
N = 101
|
|
phi = (-(N-1)/2:((N-1)/2))/(N-1)*pi/2;
|
|
|
|
k=1;
|
|
for k=1:length(d)
|
|
err(:,k) = tan(phi)*d(k);
|
|
end
|
|
|
|
close all;
|
|
plot(phi, err); grid; xlabel('error(phi)')
|
|
|
|
err = (-(N-1)/2:((N-1)/2))/(N-1);
|
|
phi = [];
|
|
k=1;
|
|
for k=1:length(d)
|
|
phi(:,k) = atan(err/d(k));
|
|
end
|
|
|
|
figure;
|
|
plot(err, 180*phi/pi); grid; xlabel('phi(err)')
|
|
|
|
|
|
endfunction
|
|
|