Aufgrund einer Wartung wird GitLab am 19.10. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 19.10. between 8:00 and 9:00 am.

test_ita_Value.m 793 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
function test_ita_Value()

% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved. 
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder. 
% </ITA-Toolbox>

a = itaValue('-0.20 kg');
b = itaValue(2);
c = itaValue(21,'N');
d = itaValue();
s = ita_generate('noise',1,44100,14);

%% stupid arithmetic
disp('aritmetic test')
x = a + b;
x = 2 + b;
x = b + 2;

x = a - b;
x = 2 - b;
x = b - 2;

x = a * b;
x = 2 * b;
x = b * 2;

x = a .* b;
x = 2 .* b;
x = b .* 2;

x = a / b;
x = 2 / b;
x = b / 2;

x = a ./ b;
x = 2 ./ b;
x = b ./ 2;

x = sqrt(b);
x = power(b,2);
x = power(2,b);

x = log(c);
x = log10(c);
x = exp(c);

%% test with itaAudio object
disp('test with audio objects')
res = a * s;
res = a .* s;
res = a / s;
res = a ./ s;