File: function_vectors1d.fee

package info (click to toggle)
feenox 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,068 kB
  • sloc: ansic: 28,856; sh: 7,201; makefile: 556; python: 554; xml: 500
file content (20 lines) | stat: -rw-r--r-- 244 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FUNCTION f(x) DATA {
0 0
1 1
2 4
3 9
}

VECTOR b(vecsize(vec_f))

b[1] = 0
b[2] = 0.5
b[3] = 2.5
b[4] = 3

FUNCTION g(x) VECTORS vec_f_x b

f_a = vecmin(vec_f_x)
f_b = vecmax(vec_f_x)

PRINT_FUNCTION f g MIN f_a MAX f_b NSTEPS 2*vecsize(vec_f)