I have a code which goes like this:
ClearAll["Global`*"]
tbl = Table[{x, N[x^2]}, {x, 0.1, 10, 0.1}];
const1 = 2;
const2 = 1.2;
newrow[{k_, r1_}] := {k, r1, (k + r1) 50/const2, (k + r1) 1.6/2.6};
newtbl = Map[newrow, tbl];
Export["file" <> ToString[const1] <> ".dat", newtbl];
rowlength = Length[newtbl];
xaxis = Table[newtbl[[i, 1]], {i, 1, rowlength}];
yaxis1 = Table[newtbl[[i, 2]], {i, 1, rowlength}];
ListLinePlot[Transpose[{xaxis, #}] & /@ {yaxis1},
AxesStyle -> Directive[GrayLevel[0], AbsoluteThickness[1.6]],
PlotLabel -> None, LabelStyle -> {16, GrayLevel[0]},
AxesLabel -> {"k\[Rho]", "\[Omega]"}, PlotRange -> Full]
The output graph looks like this:
In the exported file one can see that there are 4 columns and I am plotting 1st and 2nd column. Now, I would like to plot with certain condition that has to be imposed. E.g. I want to plot 2nd colum only when
- the third column value is between 1000 and 2000, and also
- the fourth column value is greater than 10 (it can go upto any value)
I want both this condition to be satisfied simultaneously and generate plot. In this case one can see that condition gets satisfied only when the first column has value in between 4.5 to 6.4.How can this be accomplished?
The solution that is described here does not serve the purpose.
What should I do?
Thanks in advance.


And, which has the shorthand&&. – Szabolcs Mar 12 '20 at 10:56