Tag Info

New answers tagged

2

Based on your self-answer I think you want this: SeedRandom[0] FullTab1 = RandomComplex[{0 I + 0, 2 I + 2}, {20, 3}]; (* example data *) sel = Select[FullTab1, Im[First[#]] > 0.9 &]; lgt = Length @ sel; {ext, mx1, mx2} = Transpose[{Re@sel, Im@sel}, {3, 2, 1}]; ListPlot[ext] ListPlot[mx1] ListPlot[mx2]


0

Here is a construct you might like: ifNot[f_, x_][y_] /; MatchQ[y, x] := y ifNot[f_, x_][y_] := If[MatchQ[#, x], y, #] & @ f[y] Example: ifNot[#^2 &, 4] /@ {1, 2, 3, 4, 5} {1, 2, 9, 4, 25} This is designed to work with patterns as well as literals for parameter x.


1

For example, here is a way to do what you want with one single function. In the following example, instead of Null, the "forbiden" value is 1, and someactionis computing Mod[x, 2] function (which gives the remainder on division of x by 2). Let's define someaction, Mathematica allows to do this : someaction[x_List] := someaction /@ DeleteCases[x, 1]; ...


0

I found my desired answer. In case anyone needs something similar, I'm posting my code here. If anyone cares to clean it up that would be great because I don't know most shortcut tricks. Here it is: lgt = Length[Select[FullTab1, Im[First[#]] > 0.9 &][[All, 1]]] ext = Table[{Re[Select[FullTab1, Im[First[#]] > 0.9 &][[j, 1]]], ...



Top 50 recent answers are included