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 7991533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:19:04+00:00 2026-06-04T13:19:04+00:00

I am trying to find and remove correlated columns from data with the function

  • 0

I am trying to find and remove correlated columns from data with the function below

function [ correlated ] = correlated( data, threshold )
% data is m x m matrix
% threshold is correlation threshold


c=corr(data);
[i,j] = find(c>threshold);
A = [i,j]; 
A=A(find(arrayfun(@(i)length(unique(A(i,:))),1:size(A,1))==size(A,2)),:); 
% as A also includes 1 1; 2 2; 3 3; etc so I used above line that I found somewhere

%      6     4
%      8     4
%      4     6
%      8     6
%      4     8
%      6     8
%     14    11
%     11    14

% it should not contain both 6 4; and 4 6; how do I remove all such rows?

end

it should not contain both 6 4; and 4 6; how do I remove all such rows?

  • 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-04T13:19:05+00:00Added an answer on June 4, 2026 at 1:19 pm
    uniqueA = unique(sort(A,2), 'rows');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying find the best way to remove nonnumerical data from a varchar in
I was trying to find a way to remove the math.random function from this
I'm trying to find paragraphs with the id "test" and remove them from a
I'm trying to find a htaccess rewrite to remove www. from https: pages only.
What I'm trying to find out is which php function allows me to remove
I'm trying to find a way to remove zombie locks using the Subversion command
Trying to find a way to send a POST HTTPS request from Python to
2010-June-11 <remove>2010-June-2</remove> <remove>2010-June-3</remove> 2010-June-15 2010-June-16 2010-June-17 2010-June-3 2010-June-2 2010-June-1 I'm trying to find all
I'm trying to find all letters and dashes and dollar signs and remove them
I'm trying to find a way to strip tags from a user-inputted string except

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.