File: splsmooth.pcm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (40 lines) | stat: -rw-r--r-- 518 bytes parent folder | download | duplicates (3)
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
clear
!
x = [0;1;2;3;5;6;4;3;5;10]
y = 2*x^2-3*x+50 + 100*ran(x)
!
window 0
defaults
set
 plotsymbol -10
 plotsymbolcolor red
  
graph x y
set
 plotsymbol 0
 tension 0
 curvecolor blue

m = splsmooth(x,y,100)
graph\overlay m[*,1] m[*,2]
set
 textinteractive 0
 textalign 1
 %xtextlocation 15
 %ytextlocation 80
 %textheight 6
 textcolor blue

text 'tension = 0'
set
 tension 0.01
 curvecolor lime

m = splsmooth(x,y,100)
graph\overlay m[*,1] m[*,2]
set
 %ytextlocation 70
 textcolor lime

text 'tension = 0.01'
replot