G'MIC exercises

@David_Tschumperle @Reptorian I started a conversation about MATLAB / Octave having array indexing in posts 474-479 (when I focused on conditionals). Here is another example where I find it expedient.

I have been making PDFs and CDFs, and wanted to check if I got it right by matching the output, which is a long column of values in Octave and a displayed image in G’MIC. Eyeballing the values is kind of annoying, esp. the super tall column of Octave. To simplify the task, I could do find(pdf>0) and pdf(pdf>0) to find the indexes and values, respectively, that are greater than 0; or whatever else I would like to query.

octave:8> find(pdf>0)
ans =

    85
    92
   104
   106
   108
   113
   114
   116
   117
   124
   125
   126
   128

octave:9> pdf(pdf>0)
ans =

   0.066667
   0.066667
   0.066667
   0.066667
   0.133333
   0.133333
   0.066667
   0.066667
   0.066667
   0.066667
   0.066667
   0.066667
   0.066667

I am unsure whether I could do something similar in G’MIC.

Also, I wonder if there is a way to view the data in console. The default behavior is to truncate it to data = (0,0,0,0,0,0,0,0,0,0,0,0,(...),0,0,0,0,0,0,0,0,0,0,0,0).. I feel the interpreters lack what the other has in this respect. They might have the feature but I am not aware of it or it isn’t simple to do.