# How to define new functions for plotting in tkz-fct?

Is it possible to define new functions in tkz-fct and use them to plot using \tkzFct?

-
Sorry but my english is not very fine, you want define new functions or new macros ? If you want new mathematic functions, you need to create them like with tikz. In the cvs version of Tikz I create some new functions for arithmetics integers. If you can complete your question, I give you a more complete answer. –  Alain Matthes May 24 '11 at 17:56
Yes I want new mathematical functions –  student May 24 '11 at 18:21
What kind of functions ? –  Alain Matthes May 24 '11 at 21:11

You can define new functions using \pgfmathdeclarefunction. For example, the following defines a gaussian function that can be used in TikZ:

\documentclass{article}
\usepackage{tikz}

\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%
}

\begin{document}
\begin{tikzpicture}
\draw [help lines] (-2,0) grid [step=0.5] (2,1);
\draw plot [domain=-2:2,samples=40] (\x,{gauss(\x,0,0.5)});
\end{tikzpicture}
\end{document}


-