Fixed 08 octave

This commit is contained in:
NuarkNoir 2020-01-11 19:50:41 +07:00
parent aba9e0b455
commit 2fae7df017
3 changed files with 20 additions and 18 deletions

View file

@ -1,16 +1,16 @@
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001 1001
1010 0111
0011
000000
0100
0010
0001
000001
0101
1000
1011 1011
1100 110
1101 1010
1110 00001
1111 111
0110

View file

@ -1,3 +1,5 @@
pkg load communications;
#stage 6 #stage 6
V=33; V=33;
rand("state", V); rand("state", V);
@ -9,7 +11,7 @@ ralph = r./sum(r);
save -ascii "hex.txt" ralph; save -ascii "hex.txt" ralph;
#stage 8 #stage 8
code = arrayfun(@(n)dec2bin(n, 4), 0:15, "UniformOutput", false); code = cellfun(@(c)char('0' + c), huffmandict(alph, ralph), 'UniformOutput', false);
dlmwrite('code.txt', char(code), ''); dlmwrite('code.txt', char(code), '');
#stage 9 #stage 9

View file

@ -1 +1 @@
4.00000000e+00 3.90563513e+00 4.00000000e+00 9.76408783e-01 3.94749678e+00 3.90563513e+00 4.00000000e+00 9.89395393e-01