Math & Science"Undefined control sequence" error

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
rkdrnf
Posts: 1
Joined: Mon Mar 28, 2011 6:36 pm

"Undefined control sequence" error

Post by rkdrnf »

(Hilfe auf deutsch: Undefined control sequence - wie finde ich heraus, was fehlt? - LC editor remark)

Code: Select all

\documentclass[a4paper]{article}
\usepackage{amsmath}
\begin{document}
\title{\ \\ \LARGE\bf Computer Structure Homework \#1\\}

\author{2009-11748 Joon Hyeong Ahn}

\maketitle
\begin{itemize}
\item 1.3.4-6

{\it 1.3.4} Find the IPC(instructino per cycle) for each processor\\
IPC = No.instructions / (Time * Clock Rate)

A: \[\frac{20*10^9}{(2*10^9)*(7)}=\frac{10}{7} \unit{instructions/cycle}\]

B: \[\frac{30 \cdot 10^9}{(1.5\cdot 10^9)\cdot(10)}=2\unit{instructions/cycle}\]

C: \[\frac{90\cdot 10^9}{(3\cdot 10^9)\cdot(9)}=\frac{10}{3}\unit{instructions/cycle}\]
\end{itemize}
\end{document}

In this .tex file, when compiled with latex,
undefined control sequence error occur in each A: B: C: sentence.
but I can't find error there. someone plz help me..


Code: Select all

\[
\begin{split}
\frac{\textrm{P2.instructions}}{\textrm{P2.Clock Rate}\cdot\textrm{P2.IPC}}=7 \\ \\ 
\textrm{P2.Clock Rate}=\frac{15}{7}\unit{GHz}
\end{split}
\]\\
there's also same error in this context too, I don't know what happened to my code..
I'm really new to LaTeX..

..did I posted at wrong category..? new to here.. If I did, sorry..
Last edited by Stefan Kottwitz on Sat Jul 13, 2013 4:48 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

"Undefined control sequence" error

Post by localghost »

Actually the log file is very clear in this regard (if you know how to interpret error messages given by the compiler).

Code: Select all

! Undefined control sequence.
l.18 ...{20*10^9}{(2*10^9)*(7)}=\frac{10}{7} \unit
                                                  {instructions/cycle}\]
! Undefined control sequence.
l.20 ...dot 10^9}{(1.5\cdot 10^9)\cdot(10)}=2\unit
                                                  {instructions/cycle}\]
! Undefined control sequence.
l.22 ...}{(3\cdot 10^9)\cdot(9)}=\frac{10}{3}\unit
                                                  {instructions/cycle}\]
The compiler marks the critical place in the code by shifting one line down. So in this case the undefined \unit command is the culprit. Presumably it comes from the units package which you forgot to include. The question is where you got this code from.

Finally some remarks not related to the problem. Instead of obsolete syntax from LaTeX2.09 you should use LaTeX2e for font styles like bold face and italics.


Best regards and welcome to the board
Thorsten
Post Reply