[pstricks] arrayjob and multiple array elements in one pstricks function does not worked as expected

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sat Apr 12 16:37:28 CEST 2014


Am 12.04.2014 13:33, schrieb Juergen Rose:
> Am Freitag, den 11.04.2014, 16:33 +0200 schrieb Herbert Voss:
>> Am 10.04.2014 17:54, schrieb Juergen Rose:
>>
>>> I still have two further question connected with arrays. The first I
>>> would like to add here, The second I will post with a separate subject,
>>> I tried to calculate the values of an array \RMin from an array \Rprobe,
>>> but I was not succesful. My code looks like:

> The complete code is in the attachment.

this worked for me:

\documentclass[]{article}

\usepackage[]{fp}
\usepackage{pst-plot}\SpecialCoor
\usepackage{arrayjobx}
\pagestyle{empty}
\parindent=0pt
\usepackage[left=1cm,right=1cm,top=1.5cm,bottom=1.5cm,textheight=24cm,textwidth=18.5cm]{geometry}

\begin{document}

\FPupn\Rzero{2 3 root 2 mul 3 sub 3 div}

\newarray\Rprobe
\readarray{Rprobe}{0&0.3&3&30&300}
\newarray\RMin

Rzero=\Rzero

\expandarrayelementtrue
\multido{\iInd=1+1}{4}{%
   \checkRprobe(\iInd)%
   \FPmul\aux\cachedata{\Rzero}%
   \def\Value{\aux}
   iInd=\iInd ~ Rprobe(\iInd)=\Rprobe(\iInd) ~:~  aux=\aux ~ Value=\Value\\
   \arrayx{RMin}(\iInd)={\Value}
}

\multido{\iInd=1+1}{4}{%
   RMin(\iInd)=\RMin(\iInd) \\
}
\end{document}


Herbert




More information about the PSTricks mailing list