Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7652891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:53:12+00:00 2026-05-31T11:53:12+00:00

I have a matrix and an array: m = Matrix[ [1, 2, 3], [11,

  • 0

I have a matrix and an array:

m = Matrix[
 [1, 2, 3],
 [11, 15, 20]
]

array = [11, 13, 14, 18]

Is there a way to determine which elements from the array lie between the top and bottom rows of each column of the matrix? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:53:13+00:00Added an answer on May 31, 2026 at 11:53 am

    It’s not perfectly clear what you mean by “between”, but a simple understanding is:

    def filter_array_between_first_and_last_rows_of_matrix(array,m)
      lower = m.row_vectors.first.max
      upper = m.row_vectors.last.min
      array.select{|e| lower < e && e < upper}
    end
    

    here’s another interpretation:

    def filter_array_between_first_and_last_rows_of_matrix(array,m)
      bounds_pairs = m.column_vectors.map { |cv| [cv.first, cv[-1]] }
      array.select {|e| bounds_pairs.any? { |lo,hi| lo < e && e < hi } }
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have NxM matrix with integer elements, greater or equal than 0. From any
I have a 2D numpy array (i.e matrix) A which contains useful data interspread
I have a non-fixed dimensional matrix M, from which I want to access a
I have a matrix in the type of a Numpy array. How would I
I have a matrix in R. Each entry i , j is a score
I have a matrix I , and I want to accumulate in an array
Using MATLAB , I have an array of values of size 8 rows x
I have to find a diagonal difference in a matrix represented as 2d array
I have a matrix of checkboxes which I am laying out in a table.
I have a 2d array matrix[10][10] that I'd like to inspect at debug time.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.