Skip to content

Commit a946a84

Browse files
Merge pull request #59 from chiranthsiddappa/trellis-plots
Trellis plots
2 parents cb37894 + ab02150 commit a946a84

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
numpy>=1.20.0
2-
matplotlib
2+
matplotlib>=3.0.0
33
scipy>=1.1.0

src/sk_dsp_comm/fec_conv.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -735,17 +735,17 @@ def trellis_plot(self,fsize=(6,4)):
735735
plt.axis([-0.01, 1.01, -(self.Nstates-1)-0.05, 0.05])
736736
for m in range(self.Nstates):
737737
if branches_from.input1[m] == 0:
738-
plt.plot([0, 1],[-branches_from.states1[m], -m],'b')
739-
plt.plot([0, 1],[-branches_from.states1[m], -m],'r.')
738+
plt.plot([0, 1],[-branches_from.states1[m], [-m]],'b')
739+
plt.plot([0, 1],[-branches_from.states1[m], [-m]],'r.')
740740
if branches_from.input2[m] == 0:
741-
plt.plot([0, 1],[-branches_from.states2[m], -m],'b')
742-
plt.plot([0, 1],[-branches_from.states2[m], -m],'r.')
741+
plt.plot([0, 1],[-branches_from.states2[m], [-m]],'b')
742+
plt.plot([0, 1],[-branches_from.states2[m], [-m]],'r.')
743743
if branches_from.input1[m] == 1:
744-
plt.plot([0, 1],[-branches_from.states1[m], -m],'g')
745-
plt.plot([0, 1],[-branches_from.states1[m], -m],'r.')
744+
plt.plot([0, 1],[-branches_from.states1[m], [-m]],'g')
745+
plt.plot([0, 1],[-branches_from.states1[m], [-m]],'r.')
746746
if branches_from.input2[m] == 1:
747-
plt.plot([0, 1],[-branches_from.states2[m], -m],'g')
748-
plt.plot([0, 1],[-branches_from.states2[m], -m],'r.')
747+
plt.plot([0, 1],[-branches_from.states2[m], [-m]],'g')
748+
plt.plot([0, 1],[-branches_from.states2[m], [-m]],'r.')
749749
#plt.grid()
750750
plt.xlabel('One Symbol Transition')
751751
plt.ylabel('-State Index')

0 commit comments

Comments
 (0)