jamie@29
|
1 /* xtract~ - PD library for feature extraction
|
jamie@29
|
2 Copyright (C) 2006 Jamie Bullock
|
jamie@29
|
3
|
jamie@29
|
4 This program is free software; you can redistribute it and/or
|
jamie@29
|
5 modify it under the terms of the GNU General Public License
|
jamie@29
|
6 as published by the Free Software Foundation; either version 2
|
jamie@29
|
7 of the License, or (at your option) any later version.
|
jamie@29
|
8
|
jamie@29
|
9 This program is distributed in the hope that it will be useful,
|
jamie@29
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
jamie@29
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
jamie@29
|
12 GNU General Public License for more details.
|
jamie@29
|
13
|
jamie@29
|
14 You should have received a copy of the GNU General Public License
|
jamie@29
|
15 along with this program; if not, write to the Free Software
|
jamie@29
|
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
jamie@29
|
17 */
|
jamie@29
|
18
|
jamie@29
|
19 #include "xtract/libxtract.h"
|
jamie@29
|
20 #include <stdio.h>
|
jamie@29
|
21
|
jamie@29
|
22 int main() {
|
jamie@29
|
23
|
jamie@29
|
24 float mean = 0, vector[] = {1, 2, 3};
|
jamie@29
|
25
|
jamie@56
|
26 xtract[XTRACT_MEAN]((void *)&vector, 3, NULL, (void *)&mean);
|
jamie@29
|
27
|
jamie@29
|
28 printf("\nThe mean of [1, 2, 3] = %.1f\n\n", mean);
|
jamie@29
|
29
|
jamie@29
|
30 return 0;
|
jamie@29
|
31
|
jamie@29
|
32 }
|