File: legnomial.ft

package info (click to toggle)
fudgit 2.42-6
  • links: PTS
  • area: non-free
  • in suites: potato, woody
  • size: 2,468 kB
  • ctags: 2,375
  • sloc: ansic: 27,729; makefile: 793; yacc: 724; lex: 102; asm: 29; fortran: 15
file content (18 lines) | stat: -rw-r--r-- 511 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Install a C function returning the value of the
# the Legendre nomial of degree n
# Let's call the function legn internally
reinstall ./legnomial.o leg=legn(x, order) vleg:vlegn(VX, VY, data, order)
# Calculate Nomial from -1 to 1 for order 1 to 5
set data 500
# Build X vector from -1 to 1
cmode n=1; X=n++ * 2 / data; X-=1
let i=0
let Y=0
echo Testing...
# ResetPlot, tplot are defined in fudgitrc example.
ResetPlot
while (i < 5)  # This is a fmode while
	let vlegn(X, Y, data, ++i)
	tplot X Y "$i"
end