Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
imAlessas committed Feb 4, 2024
1 parent 5575ced commit fba3f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/chapters/analysis/source-encoding.tex
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ \subsection{Shannon-Fano algorithm}

\begin{lstlisting}
% Probability vector sorted from highest to lowest
P = sort(PROBABILITY_VECTOR, 'descend');
sorted_prob_vector = sort(probability_vector, 'descend');


% Values obtained with Shannon-Fano code algorithm
Expand Down Expand Up @@ -75,13 +75,13 @@ \subsection{Binary entropy}

\begin{lstlisting}
% Average codeword length
m_average = dot(P, m);
m_average = dot(sorted_prob_vector, m);

% Average number of 0 symbols
m_0_average = dot(P, m_0);
m_0_average = dot(sorted_prob_vector, m_0);

% Average number of 1 symbols
m_1_average = dot(P, m_1);
m_1_average = dot(sorted_prob_vector, m_1);
\end{lstlisting}


Expand Down
Binary file added doc/main.pdf
Binary file not shown.

0 comments on commit fba3f7a

Please sign in to comment.