Math & ScienceProblem with FPeval and datatool

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
Oelle74
Posts: 3
Joined: Wed Jul 06, 2016 11:23 am

Problem with FPeval and datatool

Post by Oelle74 »

Hi,

I would like to calaculate with numbers which I have imported via datatool.

Here is an example:

Code: Select all

Code, edit and compile here:
\documentclass[12pt,a4paper]{article}
\usepackage{amsfonts, amsmath, amssymb, latexsym, amscd}
\usepackage[latin1]{inputenc}
\usepackage[german]{babel}
\usepackage{datatool}
\usepackage{fp}
\begin{document}
\DTLsetseparator{;}
\DTLloaddb{Komm}{Komm_2005R_2010-12_0_5.csv}
\DTLsetseparator{,}
\newcommand{\D}[2]{\FPadd{\erg}{1}{#2}\FPround{\erg}{\erg}{0} \DTLgetvalue{\A}{Komm}{\erg}{\dtlcolumnindex{Komm}{D#1}} \A}
$\frac{1}{\D{xA}{43}}$
\FPeval{\result}{round(1+1/2,2)}
\result
\FPeval{\resultt}{round(1/\D{xA}{43},2)}
\resultt
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
The import works well, but the last two code lines don't work. Please find attached the csv-file which I use.

Can anybody help me please?
Attachments
Komm_2005R_2010-12_0_5.csv
(20.17 KiB) Downloaded 181 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply