1
$\begingroup$

If I have the following list:

list={{{0.01, 87., 0.}, {0.03, 87., 0.18353}, {0.1, 87., 0.494987}, {0.3, 
   87., 0.899803}, {1., 87., 1.08076}, {3., 87., 1.10593}, {10., 87., 
   1.04781}, {10., 87., 1.02449}, {10., 87., 0.964193}, {30., 87., 
   1.0602}, {30., 87., 1.04075}, {30., 87., 1.05987}, {100., 87., 
   1.14661}, {100., 87., 1.00639}, {100., 87., 1.09384}, {300., 87., 
   1.067}, {300., 87., 1.15047}, {300., 87., 1.10715}, {1000., 87., 
   1.05152}, {1000., 87., 1.06942}, {1000., 87., 1.17143}, {3000., 
   87., 1.12162}, {10000., 87., 1.13136}}, {{0.01, 85., 0.}, {0.03, 
   85., 0.}, {0.1, 85., 0.443129}, {0.3, 85., 0.527854}, {1., 85., 
   0.974597}, {3., 85., 1.08727}, {10., 85., 1.09881}, {10., 85., 
   0.991704}, {10., 85., 1.09402}, {30., 85., 1.09783}, {30., 85., 
   1.14965}, {30., 85., 1.13956}, {100., 85., 0.987854}, {100., 85., 
   1.13173}, {100., 85., 1.23912}, {300., 85., 1.13003}, {300., 85., 
   1.09923}, {300., 85., 1.11004}, {1000., 85., 1.04733}, {1000., 85.,
    1.08491}, {1000., 85., 1.11656}, {3000., 85., 1.06112}, {10000., 
   85., 1.05261}}, {{0.01, 80., 0.}, {0.03, 80., 0.}, {0.1, 80., 
   0.215019}, {0.3, 80., 0.702618}, {1., 80., 1.27573}, {3., 80., 
   1.02397}, {10., 80., 1.1375}, {10., 80., 1.14245}, {10., 80., 
   0.945541}, {30., 80., 1.33324}, {30., 80., 1.07789}, {30., 80., 
   1.12324}, {100., 80., 1.14999}, {100., 80., 0.985026}, {100., 80., 
   1.1228}, {300., 80., 1.25291}, {300., 80., 1.29771}, {300., 80., 
   1.40179}, {1000., 80., 1.26045}, {1000., 80., 1.17871}, {1000., 
   80., 1.32166}, {3000., 80., 1.27041}, {10000., 80., 
   1.23387}}, {{0.01, 75., 0.}, {0.03, 75., 0.}, {0.1, 75., 
   0.0959691}, {0.3, 75., 0.37954}, {1., 75., 0.678807}, {3., 75., 
   0.90385}, {10., 75., 0.965262}, {10., 75., 1.01025}, {10., 75., 
   1.01675}, {30., 75., 1.04836}, {30., 75., 1.11345}, {30., 75., 
   1.09146}, {100., 75., 1.16961}, {100., 75., 1.19018}, {100., 75., 
   1.16968}, {300., 75., 1.20834}, {300., 75., 1.22955}, {300., 75., 
   1.19569}, {1000., 75., 1.25479}, {1000., 75., 1.32295}, {1000., 
   75., 1.22151}, {3000., 75., 1.28794}, {10000., 75., 
   1.25897}}, {{0.01, 70., 0.}, {0.03, 70., 0.}, {0.1, 70., 
   0.12702}, {0.3, 70., 0.284862}, {1., 70., 0.330209}, {3., 70., 
   0.490592}, {10., 70., 0.864811}, {30., 70., 0.951112}, {100., 70., 
   0.924481}, {300., 70., 1.02702}, {1000., 70., 1.12306}, {3000., 
   70., 1.061}, {10000., 70., 1.08021}}, {{0.01, 65., 0.}, {0.03, 65.,
    0.}, {0.1, 65., 0.}, {0.3, 65., 0.}, {1., 65., 0.}, {3., 65., 
   0.0267647}, {10., 65., 0.377013}, {30., 65., 0.616391}, {100., 65.,
    0.876983}, {300., 65., 1.02765}, {1000., 65., 1.13803}, {3000., 
   65., 1.13322}, {10000., 65., 1.21018}}, {{0.01, 60., 0.}, {0.03, 
   60., 0.}, {0.1, 60., 0.}, {0.3, 60., 0.}, {1., 60., 0.}, {3., 60., 
   0.}, {10., 60., 0.}, {10., 60., 0.}, {10., 60., 0.}, {30., 60., 
   0.294614}, {100., 60., 0.430481}, {300., 60., 0.635893}, {1000., 
   60., 0.88309}, {3000., 60., 1.18007}, {10000., 60., 
   1.28467}}, {{0.01, 55., 0.}, {0.03, 55., 0.}, {0.1, 55., 0.}, {0.3,
    55., 0.}, {1., 55., 0.}, {3., 55., 0.}, {10., 55., 0.}, {10., 55.,
    0.}, {10., 55., 0.}, {30., 55., 0.}, {30., 55., 0.}, {30., 55., 
   0.}, {100., 55., 0.}, {100., 55., 0.}, {100., 55., 0.}, {300., 55.,
    0.0721335}, {1000., 55., 0.214175}, {3000., 55., 
   0.748622}, {10000., 55., 1.05191}}}

how can I get the same list but ignoring the sublists based on the second value. For example, how can I get the same list avoiding numbers lower than 75 based on the second value (e.g.{firt value,second value,third value},{firt value,second value,third value}.....)as to get:

list={{{0.01, 87., 0.}, {0.03, 87., 0.18353}, {0.1, 87., 0.494987}, {0.3, 
   87., 0.899803}, {1., 87., 1.08076}, {3., 87., 1.10593}, {10., 87., 
   1.04781}, {10., 87., 1.02449}, {10., 87., 0.964193}, {30., 87., 
   1.0602}, {30., 87., 1.04075}, {30., 87., 1.05987}, {100., 87., 
   1.14661}, {100., 87., 1.00639}, {100., 87., 1.09384}, {300., 87., 
   1.067}, {300., 87., 1.15047}, {300., 87., 1.10715}, {1000., 87., 
   1.05152}, {1000., 87., 1.06942}, {1000., 87., 1.17143}, {3000., 
   87., 1.12162}, {10000., 87., 1.13136}}, {{0.01, 85., 0.}, {0.03, 
   85., 0.}, {0.1, 85., 0.443129}, {0.3, 85., 0.527854}, {1., 85., 
   0.974597}, {3., 85., 1.08727}, {10., 85., 1.09881}, {10., 85., 
   0.991704}, {10., 85., 1.09402}, {30., 85., 1.09783}, {30., 85., 
   1.14965}, {30., 85., 1.13956}, {100., 85., 0.987854}, {100., 85., 
   1.13173}, {100., 85., 1.23912}, {300., 85., 1.13003}, {300., 85., 
   1.09923}, {300., 85., 1.11004}, {1000., 85., 1.04733}, {1000., 85.,
    1.08491}, {1000., 85., 1.11656}, {3000., 85., 1.06112}, {10000., 
   85., 1.05261}}, {{0.01, 80., 0.}, {0.03, 80., 0.}, {0.1, 80., 
   0.215019}, {0.3, 80., 0.702618}, {1., 80., 1.27573}, {3., 80., 
   1.02397}, {10., 80., 1.1375}, {10., 80., 1.14245}, {10., 80., 
   0.945541}, {30., 80., 1.33324}, {30., 80., 1.07789}, {30., 80., 
   1.12324}, {100., 80., 1.14999}, {100., 80., 0.985026}, {100., 80., 
   1.1228}, {300., 80., 1.25291}, {300., 80., 1.29771}, {300., 80., 
   1.40179}, {1000., 80., 1.26045}, {1000., 80., 1.17871}, {1000., 
   80., 1.32166}, {3000., 80., 1.27041}, {10000., 80., 
   1.23387}}, {{0.01, 75., 0.}, {0.03, 75., 0.}, {0.1, 75., 
   0.0959691}, {0.3, 75., 0.37954}, {1., 75., 0.678807}, {3., 75., 
   0.90385}, {10., 75., 0.965262}, {10., 75., 1.01025}, {10., 75., 
   1.01675}, {30., 75., 1.04836}, {30., 75., 1.11345}, {30., 75., 
   1.09146}, {100., 75., 1.16961}, {100., 75., 1.19018}, {100., 75., 
   1.16968}, {300., 75., 1.20834}, {300., 75., 1.22955}, {300., 75., 
   1.19569}, {1000., 75., 1.25479}, {1000., 75., 1.32295}, {1000., 
   75., 1.22151}, {3000., 75., 1.28794}, {10000., 75., 
   1.25897}}}

In the same way how can I get the same list based on the second when the second value is between 75 and 55.

Thank you in advanced

$\endgroup$
3
$\begingroup$
DeleteCases[{}] @ Map[Select[#[[2]] >= 75 &]] @ list

enter image description here

DeleteCases[{}] @ Map[Select[55 <= #[[2]] < 75 &]] @ list

enter image description here

$\endgroup$
3
  • $\begingroup$ kglr Thank you!. It works but there is something extra that is generated at the end of the list like {}.how can I avoid the {} that are generated at the end of the code? $\endgroup$
    – John
    May 2 '20 at 20:56
  • $\begingroup$ @John, please see the updated version. $\endgroup$
    – kglr
    May 2 '20 at 20:58
  • $\begingroup$ This works great! Thank you !!! $\endgroup$
    – John
    May 2 '20 at 21:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.