[pstricks] A little bit more complicated function definition fails again. Was: Can't use a mathematical function defined with FPeval in \psplot
Herbert Voss
Herbert.Voss at FU-Berlin.DE
Tue Apr 15 14:38:27 CEST 2014
Am 15.04.2014 14:01, schrieb Juergen Rose:
> But if I remove the fixed value for myMathFuncTwo{3.5} an try to use the
> calculated value FPeval\myMathFuncTwo{\myMathFunction{2}{(\Vre{})}}:
>
> \documentclass{article}
>
> \usepackage[nomessages]{fp}
> \usepackage{pst-plot}
>
> \def\Vre{350}
>
> \begin{document}
>
> \edef\nonr#1#2{2*((#2)/2)^(1/3)/((2)^0.5*(#1))+(6)^0.5/2-1}
> \def\myMathFunction#1#2{(\nonr{(#1)}{(#2)}) * 5 - (\nonr{(#1)}{(#2)})^2}
\documentclass{article}
\usepackage[nomessages]{fp}
\usepackage{pst-plot}
\def\Vre{350}
\begin{document}
\edef\nonr#1#2{2*((#2)/2)^(1/3)/((2)^0.5*(#1))+(6)^0.5/2-1}
\edef\myMathFunction#1#2{(\nonr{#1}{#2}) * 5 - (\nonr{#1}{#2})^2}
\FPeval\myMathFuncTwo{\myMathFunction{2}{(\Vre)}}
\pspicture[shift=*](-1,0)(15,7)
\psaxes{->}(14.5,7.5)
\psline[linecolor=red](0,0.5)(2,0.5)
\psline[linecolor=red](2,0.5)(2,\myMathFuncTwo)
\psplot[algebraic,linecolor=red,linewidth=1.5pt]{2}{5}{%
\myMathFunction{x}{\Vre}%
}
\psplot[algebraic,linecolor=red,linewidth=1.5pt]{5}{14}{%
\myMathFunction{x}{\Vre}%
}
\endpspicture
\end{document}
Herbert
More information about the PSTricks
mailing list