# Extracting information from list

I have a huge list that looks like this:

list = {8, 12, 201, 0.001, 3, 7, 100
(InterpolatingFunction[{{0., 0.0018}},"<>"][2916/35] +
InterpolatingFunction[{{0., 0.0018}}, "<>"][2916/35]),
23, 44, 11, -0.002}


I want to extract only the numbers, specifically the numbers around 10. I tried using this Select[list, _?(7 <= # <= 13 &)] but it returns an empty list. I think this happens because the list has both numbers and the 100 (InterpolatingFunction... that I want to ignore. I would also be happy just to extract ALL numbers hence ignoring the 100(InterpolatingFunction... elements.

Could you give me some tip please?

-
You can use Select[..., NumberQ[#] && 7 <= # <= 13 & ] –  b.gatessucks Mar 13 '13 at 9:54
Thank you so much! That makes it! Should I delete the question? –  Sosi Mar 13 '13 at 10:00
You should never delete a question because you got an answer (only if your question was over-the-top stupid). It may be useful to others as well. –  Sjoerd C. de Vries Mar 13 '13 at 10:13
Why is that InterpolatingFunctionthere in the first place? Wouldn't you like to have that evaluated to a real number? –  Sjoerd C. de Vries Mar 13 '13 at 10:15
@Sjoerd: list comes as result of integrating a system using NDSolve considering around 4000 combinations of parameters. Some of those combinations do not yield a solution for the integration.. If possible, yes, I would like to have it evaluated to a real number, but the numerical integration doesn't finish until the endtime I allocated, and the endtime of the InterpolatingFunction is far from the desired (e.g. 0.018429 out of the desired 83.3). –  Sosi Mar 13 '13 at 10:58

Select wants a function as second argument, not a pattern. You can either use Cases or Select with a pure function:
Cases[list, _?(7 <= # <= 13 &)]

One more thing: if I want to select the elements of another list otherlist={{1/10,1,1/100,10},{1/100,1,1/100,10},...} that were used as arguments to obtain list={8,12,201,0.001,3,7,100(InterpolatingFunction[{{0.,0.0018}},"<>"][2916/35]‌​+InterpolatingFunction[{{0.,0.0018}},"<>"][2916/35]),23,44,11,-0.002} I thought I could use Pick[otherlist,list,NumberQ[#]&&7<=#<=13&]. Yet, it isn't working and returns that both lists have incompatible shapes. But both lists have the same length.. –  Sosi Mar 13 '13 at 10:09
@Sosi: same problem the other way round: Pick wants, as Cases, a pattern, not a function. Pick[otherlist,list,_?(NumberQ[#]&&7<=#<=13&)] should work, if both lists really have the same structure. Something that might be a problem is that Pick applies the check to all levels of list, so depending on what exactly is the content you might see the shapes-warning. It then probably is better to create a "selection" list independently: Pick[otherlist, (NumberQ[#] && 7 <= # <= 13) & /@ list] –  Albert Retey Mar 13 '13 at 10:22