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

  • Home
  • SEARCH
  • 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 9223611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:06:51+00:00 2026-06-18T04:06:51+00:00

I have a matrix like this one: myarray=cov(matrix(rexp(200),50,10)) I would like to generate all

  • 0

I have a matrix like this one:

myarray=cov(matrix(rexp(200),50,10))

I would like to generate all possible combinations of columns and compute the correlation matrix for each combination, if possible, using column numbers instead of names. In a second step I would like to compute the determinant of each matrix so maybe there is an efficient way to do it.

  • 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-06-18T04:06:52+00:00Added an answer on June 18, 2026 at 4:06 am

    Here is one way:

    list.of.matrices <- apply(expand.grid(rep(list(c(FALSE, TRUE)), ncol(myarray))),
                              1, function(j)myarray[, j, drop = FALSE])
    
    length(list.of.matrices)
    # [1] 1024
    

    Then do something like:

    result <- sapply(list.of.matrices, function_of_your_choice)
    

    but note that det can only be applied to square matrices… Please clarify.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

e.g I have the original matrix (m) looks like this one 1 2 3
I have a matrix with one column like this: NNN NNN NNN AAA AAA
For example i have an image matrix that looks like this one: 1 2
Say in Matlab I have a matrix like this: 1 2 3 4 5
I have a string like this: matrix(10, 0, 1, 0, -198, 23) Then I
Suppose that I have a 2D array (matrix) in Java like this... int[][] MyMat
I have a function like this: MyFunction(double matrix[4][4]) {/*do stuff*/} I am calling this
I have a vector, v3, that looks like this: v3 <- matrix(c(1,1,3,3,2,2, 2,3,1,2,3,1, 3,2,2,1,1,3),
I have matrix (a) with (1:10),<10 x 1> double. I would like to copy
I have a matrix mat and would like to calculate the mean of the

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.