After using NSolve, I have a list of numbers but I only want

  • Thread starter Thread starter jemma
  • Start date Start date
  • Tags Tags
    List Numbers
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
jemma
Messages
35
Reaction score
0
After using NSolve, I have a list of numbers but I only want mathematica to print the ones which are real numbers between 0 and 1 (inclusive). How do I do that? Thanks!
 
Physics news on Phys.org


You can simply use something like

Code:
  Select[%, (0 <= # <= 1) &]

where % stands for the list you want to filter.