0

I want to create an equation like the one in photo below enter image description here

I have been using this command:

\begin{equation}
CC_{it}= 
    \begin{cases}
      1  \quad EMP_{i,t}>25 \quad  \& \quad (EMP_{i,t}-EMP_{i,t-1})>10 \\
      0 \quad \text{otherwise}
    \end{cases}
\end{equation}

I have tried to use algorithm with \If statement but it doesn't work.

How can I do that?

My main body:

\documentclass[a4paper,12pt]{report}

\usepackage[USenglish]{babel}   % language, change USenglish to german if writing in German
\usepackage{amsmath,amsfonts,amssymb,mathrsfs} % math symbols
\usepackage{graphicx}   % package for graphics
\usepackage{tabularx}   % package for tables
\usepackage{microtype} 
\usepackage{booktabs}   % for nice tables
%\usepackage{bookmark}  % allows you to click on bookmarks in the pdf, it is commented off because it might disturb you at the beginning. Comment on to see what it can do.
\usepackage{bm}         % for bold math
\usepackage{listings}   % for inserting code
\usepackage{verbatim}   % useful for program listings
\usepackage{pdflscape}  % turning wide pages by 90°
\usepackage{color}      % package for colors
\usepackage[utf8]{inputenc}
\usepackage{geometry}   % interface of your document dimensions
\usepackage[hang]{footmisc} % option hang produces hanging footnotes, see options of package
\usepackage[capposition=top]{floatrow}  % defines the position of a caption in a floating environment
\expandafter\def\expandafter\quote\expandafter{\quote\small}
\usepackage{longtable} % for long tables
\usepackage{subcaption}
\usepackage{booktabs}
\usepackage[dvipsnames]{xcolor}
\usepackage{fancyvrb}
\usepackage{makecell} % use for bold line \hlineB{2}
\usepackage{boldline} % use for bold line \hlineB{2}
\usepackage{amsmath} 
\usepackage{rotating} % to retrun tables vertically 
\usepackage{tablefootnote}
\usepackage{footnote} 
\usepackage[natbibapa]{apacite}
\usepackage{url} %for online cite
\usepackage{ifthen}
\usepackage{hyperref}

%% Customized options



\usepackage[onehalfspacing]{setspace}   % Either double-spaced, onehalf-spaced, or single-spaced
\clubpenalty=1000                       % prevents single lines at the end of page 
\widowpenalty=1000                      % prevents single lines at the top of page 
\displaywidowpenalty=1000               % for math mode
\interfootnotelinepenalty=10000         % prevents footnotes from breaking across pages
\newcommand{\N}{{\mathbb N}}            % shortcut for natural numbers
\newcommand{\R}{{\mathbb R}}            % shortcut for real numbers
\usepackage{booktabs}
\usepackage{pdfpages} 

%% Other stuff
\DeclareGraphicsExtensions{.pdf,.png,.jpg} % include pictures only with these endings
\setlength{\footnotemargin}{10pt}   % defines the space of hanging footnotes

\geometry{left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm} %sets margins on paper itself, check again before submitting/writing if you got the right numbers here
\definecolor{darkblue}{RGB}{51, 51, 178}    % defines colour of written text
\allowdisplaybreaks % allows page breaks in align envirnonment



\graphicspath{{C:/Users/Desktop/fig/}}





\begin{document}


\begin{titlepage} 



    \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} 

    \center 

    \includegraphics{logo.pdf}

    \textsc{\LARGE University }\\[1.5cm] 


    \textsc{\Large Master Thesis}\\[0.5cm] 



    \HRule\\[0.4cm]

    {\huge\bfseries }\\[0.4cm] 

    \HRule\\[1.5cm]


    \begin{minipage}{0.4\textwidth}
        \begin{flushleft}
            \large
            \textit{Author}\\

        \end{flushleft}
    \end{minipage}
    ~
    \begin{minipage}{0.4\textwidth}
        \begin{flushright}
            \large
            \textit{Supervisor}\\
             % Supervisor's name
        \end{flushright}
    \end{minipage}



    \vfill\vfill\vfill 

    {\large\today} 


    \vfill 

\end{titlepage}



\newpage


\include{chapters/abstract}
\newpage

\tableofcontents

\listoffigures

\listoftables


\include{chapters/introduction}



\include{chapters/Literature}



\include{chapters/Analysis}
%----------------------------------------------------------------------------------------





\bibliographystyle{apacite}
\bibliography{references/references}

\newpage
\include{chapters/appendix}
\end{document}
Arbnor
  • 175

0 Answers0