Skip to content
Snippets Groups Projects

Adding introduction.py

Merged Petter Källström requested to merge creating_introduction into master
All threads resolved!
1 file
+ 17
0
Compare changes
  • Side-by-side
  • Inline
+ 17
0
"""
===============================
Introduction example for course
===============================
"""
from b_asic.core_operations import Addition, ConstantMultiplication
from b_asic.signal_flow_graph import SFG
from b_asic.special_operations import Delay, Input, Output
i = Input()
d = Delay()
o = Output(d)
c = ConstantMultiplication(0.5, d)
a = Addition(i, c)
d.input(0).connect(a)
sfg = SFG([i], [o])
Loading