-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.dart
More file actions
63 lines (56 loc) · 920 Bytes
/
main.dart
File metadata and controls
63 lines (56 loc) · 920 Bytes
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
54
55
56
57
58
59
60
61
62
63
import 'plot.dart';
import 'bode.dart';
import 'multiplot.dart';
import 'plot3d.dart';
import 'params.dart';
main() {
}
void ex2D() => plot(
'x*cos(x)',
labels: new Labels(
xlabel: 'time'
),
style:Styles.impulses,
showZeroY:false,
scale:1.5
);
void ex2DMulti() => multiplot(
[
new Plot(
'x*x',
showGrid:true,
style:Styles.points,
nbPoints:2000
),
new Plot(
'1/x',
style:Styles.impulses
)
],
scale:2,
out:'multi2d'
);
void ex3D() => plot3d(
'3*x-exp(y)',
out:"3d_from_exp",
palette:Palettes.rainbow,
width:1024,
height:768
);
void ex3DFile() => plot3d(
'plt.dat',
file:true ,
out:"3d_from_file"
);
void exBode() => bode(
'(1/(1+s/10)) * (1/(1+s/10000))',
scale:1.5
);
void exBodeFromCoef() => bode(
fromCoefs(
[2.008, 0, 0, 0, 0],
[1, 1.307, 4.854, 4.249, 7.768, 4.249, 4.854, 1.307, 1]
),
frm:1e-4,
to:1e4
);