Skip to main content
added 92 characters in body
Source Link
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50

Using MatchQ and NumericQ:

t = {5/4, 12, Pi, 0.4};

MatchQ[t, {__?NumericQ}]

(*True*)

Another way to do this, nice and shorter (Thanks to @Syed!):

AllTrue[NumericQ][t]

Using MatchQ and NumericQ:

t = {5/4, 12, Pi, 0.4};

MatchQ[t, {__?NumericQ}]

(*True*)

Using MatchQ and NumericQ:

t = {5/4, 12, Pi, 0.4};

MatchQ[t, {__?NumericQ}]

(*True*)

Another way to do this, nice and shorter (Thanks to @Syed!):

AllTrue[NumericQ][t]
Source Link
E. Chan-López
  • 31.3k
  • 3
  • 29
  • 50

Using MatchQ and NumericQ:

t = {5/4, 12, Pi, 0.4};

MatchQ[t, {__?NumericQ}]

(*True*)