Commit a965b98d authored by Pierre-antoine Comby's avatar Pierre-antoine Comby

cours du 11/02

parent 476b8b99
......@@ -44,18 +44,18 @@ On a $V(x) = (1-1.75)^2\times0.5 + (2-1.75)^2\times0.25 + (3-1.75)^2\times0.25=0
\begin{example}[Générer des réalisations de VA]
Génération d'une suite de réalisations d'une VA $X$ tel que $\X=\{0,1\}$ avec $p_0=0.9,\quad p_1=0.1$
\begin{lstlisting}
\begin{minted}{matlab}
x=rand(1,10)>0.9
% rand : generateur de loi uniforme
% randn : generateur de loi gaussienne
\end{lstlisting}
\end{minted}
\noindent Pour générer une suite de réalisations correspondant aux exemples précédents
\begin{lstlisting}
\begin{minted}{matlab}
x=rand(1,10)
y= (x<0.5) + 2*(x<0.75 & x>0.5) + 3*(x>0.75)
\end{lstlisting}
\end{minted}
\end{example}
\medskip
......
This diff is collapsed.
......@@ -24,10 +24,10 @@ Estimateur biaisé :
\[ \gamma_x(k) = \frac{1}{N} \sum_{i=-k}^N x_i x_{i+k}, \forall k \leq 0 \]
Avec Matlab, on l'obtient avec :
\begin{lstlisting}
[c,k] = xcorr(x,'biased');
plot(k,c); grid;
\end{lstlisting}
% \begin{lstlisting}
% [c,k] = xcorr(x,'biased');
% plot(k,c); grid;
% \end{lstlisting}
$\gamma_x(k)$ est maximale en 0 et est égale à l'énergie $\sigma^2$ du signal.
......
\documentclass[main.tex]{subfiles}
\begin{document}
\section{Codage d'Huffman}
\section{Codage arithétique}
\section{Codage LZW}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
clear all
close all
M=20;
Delta = 0.1;
x = -5:0.01:5;
[y,idx] = quantif(x,M,Delta);
plot(x,y); grid; axis([-5 5 -5 5])
\ No newline at end of file
\documentclass{../../cours}
\usepackage{../../raccourcis}
\let\framed\relax \let\endframed\relax
\let\shaded\relax \let\endshaded\relax
\let\leftbar\relax \let\endleftbar\relax
\let\snugshade\relax \let\endsnugshade\relax
\usepackage{minted}
% Mise en page
\renewcommand{\vec}{\mathbf}
\title{Notes de Cours}
\author{Pierre-Antoine Comby}
\teacher{Michel Kieffer}
\module{455\\ Codage de source}
\usepackage{listings}
\definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
\definecolor{mylilas}{RGB}{170,55,241}
% \usepackage{listings}
% \definecolor{mygreen}{RGB}{28,172,0} % color values Red, Green, Blue
% \definecolor{mylilas}{RGB}{170,55,241}
\begin{document}
\lstset{language=Matlab, %
% basicstyle=\color{red},
breaklines=true,%
morekeywords={matlab2tikz},
keywordstyle=\color{blue},%
morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},
identifierstyle=\color{black},%
stringstyle=\color{mylilas},
commentstyle=\color{mygreen},%
showstringspaces=false,%without this there will be a symbol in the places where there is a space
numbers=left,%
numberstyle={\tiny \color{black}},% size of the numbers
numbersep=9pt, % this defines how far the numbers are from the text
emph=[1]{for,end,break},emphstyle=[1]\color{red}, %some words to emphasise
%emph=[2]{word1,word2}, emphstyle=[2]{style},
}
% \lstset{language=Matlab, %
% % basicstyle=\color{red},
% breaklines=true,%
% morekeywords={matlab2tikz},
% keywordstyle=\color{blue},%
% morekeywords=[2]{1}, keywordstyle=[2]{\color{black}},
% identifierstyle=\color{black},%
% stringstyle=\color{mylilas},
% commentstyle=\color{mygreen},%
% showstringspaces=false,%without this there will be a symbol in the places where there is a space
% numbers=left,%
% numberstyle={\tiny \color{black}},% size of the numbers
% numbersep=9pt, % this defines how far the numbers are from the text
% emph=[1]{for,end,break},emphstyle=[1]\color{red}, %some words to emphasise
% %emph=[2]{word1,word2}, emphstyle=[2]{style},
% }
\maketitle
\tableofcontents
\chapter*{Rappel de probabilité}
......@@ -39,6 +43,10 @@
\subfile{chap2.tex}
\chapter{Codage prédictif}
\subfile{chap3.tex}
\appendix
\chapter{Implémentation des différents algorithme}
\subfile{chapA.tex}
\end{document}
%%% Local Variables:
......
function [y,idx] = quantif(x,M,Delta)
idx = floor(x/Delta);
idx = max(idx,-M/2);
idx = min(idx,M/2-1);
y = idx*Delta + Delta/2;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment