iCub-main
icub-main
src
tools
trajectoryPlayer
sine.m
Go to the documentation of this file.
1
sampling_period
= 20; %ms
2
frequency
= 1; %hertz
3
amplitude
= 10; %degrees
4
offset
= 0; %degrees
5
time
= [0: 0.020: 10];
6
7
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
8
out
=
amplitude
*sin(
time
*2*pi*
frequency
)+
offset
;
9
10
figure
(1)
11
hold
on
12
grid
on
13
plot (
time
,
out
)
14
15
fileID
= fopen('trajectory.txt','w');
16
%
A
= [
time
;
out
];
17
%
fprintf
(
fileID
,'%6.3
f
%6.3
f
\
n
',
A
);
18
A
= [
out
];
19
fprintf
(
fileID
,'%6.3
f
\
n
',
A
);
20
fclose
(
fileID
);
f
f
Definition:
compute_ekf_sym.m:22
n
int n
Definition:
debugFunctions.cpp:58
on
grid on
Definition:
show_eyes_axes.m:5
fclose
fclose(fileID)
out
out
Definition:
sine.m:8
amplitude
hertz amplitude
Definition:
sine.m:3
A
A
Definition:
sine.m:16
sampling_period
sampling_period
Definition:
sine.m:1
fprintf
fprintf(fileID,'%6.3f %6.3f\n', A)
offset
degrees offset
Definition:
sine.m:4
frequency
ms frequency
Definition:
sine.m:2
fileID
out fileID
Definition:
sine.m:15
figure
figure(1) hold on grid on plot(time
time
degrees time
Definition:
sine.m:5
Generated on Thu Oct 3 2024 09:32:56 for iCub-main by
1.9.1