
\documentclass{article}
\usepackage[T1]{fontenc}
%\usepackage[utf8]{inputenc}
%\usepackage[latin1]{inputenc}
\usepackage[a4paper]{geometry}


\usepackage[french]{babel}
\usepackage{lmodern}
\usepackage{listings}
\usepackage{textcomp}
\usepackage{xcolor}
\usepackage{graphicx}
%\usepackage{pgfplots}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{physics,bm}
\usepackage{hyperref}
\usepackage{listings}




\newcommand{\altura}{.45cm}
\newcommand{\bff}{\bm{f}}
\newcommand{\bgg}{\bm{g}}
\newcommand{\by}{\bm{y}}
\newcommand{\bu}{\bm{u}}
\newcommand{\bv}{\bm{v}}
\newcommand{\bw}{\bm{w}}
\newcommand{\bW}{\bm{W}}
\newcommand{\bz}{\bm{z}}
\newcommand{\bY}{\bm{Y}}
\newcommand{\bH}{\bm{H}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\calF}{\mathcal{F}}

\lstset{ % General setup for the package
	basicstyle=\small\sffamily,
	numbers=left,
	numberstyle=\tiny,
	frame=tb,
	tabsize=4,
	columns=fixed,
	showstringspaces=false,
	showtabs=false,
	keepspaces,
	commentstyle=\color{red},
	keywordstyle=\color{blue}
}



\lstset{upquote=true,
	columns=flexible,
	keepspaces=true,
	breaklines,
	breakindent=0pt,
	basicstyle=\ttfamily,
	commentstyle=\color{gray},
	language=Scilab,
	alsoletter=\),
}

\lstset{classoffset=0,
	keywordstyle=\color{violet!75},
	deletekeywords={zeros,disp},
	classoffset=1,
	keywordstyle=\color{cyan},
	morekeywords={zeros,disp},
	extendedchars=true
}

\lstset{literate={0}{{\color{brown!75}0}}1 
	{1}{{\color{brown!75}1}}1 
	{2}{{\color{brown!75}2}}1 
	{3}{{\color{brown!75}3}}1 
	{4}{{\color{brown!75}4}}1 
	{5}{{\color{brown!75}5}}1 
	{6}{{\color{brown!75}6}}1 
	{7}{{\color{brown!75}7}}1 
	{8}{{\color{brown!75}8}}1 
	{9}{{\color{brown!75}9}}1 
	{(}{{\color{blue!50}(}}1 
	{)}{{\color{blue!50})}}1 
	{[}{{\color{blue!50}[}}1 
	{]}{{\color{blue!50}]}}1
	{-}{{\color{gray}-}}1
	{+}{{\color{gray}+}}1
	{=}{{\color{gray}=}}1
	{:}{{\color{orange!50!yellow}:}}1
}

\usepackage{etoolbox}

\makeatletter
% patch pour le bug concernant les parenthèses fermantes
% d'après http://tex.stackexchange.com/q/69472
\patchcmd{\lsthk@SelectCharTable}{%
	\lst@ifbreaklines\lst@Def{`)}{\lst@breakProcessOther)}\fi}{}{}{}

\makeatother

\title{MT12 - TPXX }
\date{P24 }
\author{Prénom NOM}

\begin{document}


	\maketitle
	\hrule
	\vspace{1\baselineskip}
\begin{center}
 L'objectif principal de ce TP est de ...
	\end{center}
	\vspace{1\baselineskip}
	\hrule
	\vspace{2\baselineskip}
	
	\section{Exemple : première section }
	
	\subsection{Exemple : première sous-section}
	Pour $N \geq 1$, on appelle transformée de Fourier discrète (TFD) d'ordre $N$ l'application linéaire notée 
	$\calF_N : \mathbb{C}^N \rightarrow \mathbb{C}^N$ qui, à un vecteur $\by=(y_0,...,y_{N-1})^\top \in \mathbb{C}^N$, associe le vecteur 
	$\bY=(Y_0,...,Y_{N-1})^T \in  \mathbb{C}^N$ dont la $n$-ième composante ($n=0,\ldots,N-1$) est définie par 
	 
\begin{align} 
& Y_n = \frac{1}{N}  \sum_{k=0}^{N-1} y_k \; \omega_N^{-n k}  \qquad \Longleftrightarrow \qquad  Y_n = (\calF_N \by)_n \label{TFD}\\ 
\text{avec} \qquad & \omega_N = e^{2i\tfrac\pi N} \nonumber 
\end{align}	
	La relation \eqref{TFD} fournit .... 


	\section{Exemple : deuxième Section }
	
	
	\subsection{Inclusion de code \texttt{Scilab}}
	
	
	\begin{lstlisting}
function y=Nom(argument)
	z = exp(argument);
	for n=...
    		for k=...
     		 .... ;
    		end;
	end;
	y=...; 
endfunction
\end{lstlisting}


\begin{lstlisting}
freq=(0:N);//abscisse des frequences
L=1:floor(N/2);//on conserve seulement la moitie des frequences

scf()
plot(freq(L),abs(...)) //abs permet de calculer le module d'un nombre complexe
\end{lstlisting} 
	
\subsection{Inclusion de graphiques}	

\begin{figure}[h!]
\centering
\includegraphics[width=0.8\textwidth]{Figure_0_pdf.pdf}    
\caption{TITRE FIG}
\label{fig1}
\end{figure}


	
La figure \ref{fig1} ... 


	\section{Conclusions}





\end{document}