Message Boards Message Boards

GROUPS:

Select ordered pairs below x^2 and count them?

Posted 1 month ago
204 Views
|
2 Replies
|
2 Total Likes
|

I have the following code

enter image description here

I want to "Select" those ordered pairs below x^2 and count them.
something like

Count[Select[t,(x=#1, #2<x^2}]]

but that doesn't work, or anything else I have tried.

2 Replies
Posted 1 month ago
In[1]:= t = RandomReal[1, {1000, 2}];

In[2]:= Length@Select[t, #[[2]] < #[[1]]^2 &]
Out[2]= 329
Posted 1 month ago

Beautiful, thank you Hans

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract