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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:35:22+00:00 2026-05-27T21:35:22+00:00

I have a linspace vector in matlab, a vector of eigenvalues and a matrix

  • 0

I have a linspace vector in matlab, a vector of eigenvalues and a matrix of its corresponding eigenvectors which I’ve obtained from the eig command.

I histogram the eigenvalues using hist(eigenvalues,linspace).

I would like to sum up all the eigenvectors corresponding to each histogram bin.

For example, bin 1 contains eigenvalues w_1, w_2, w_3, w_4. I would like to find v_bin1 = v_1 + v_2 + v_3 + v_4 where v_1, v_2, v_3, v_4 are corresponding eigenvalues for eigenvectors w_1, w_2, w_3, w_4 respectively.

How would one go about doing this, keeping vectorization in mind?

  • 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-27T21:35:22+00:00Added an answer on May 27, 2026 at 9:35 pm

    Say you have N eigenvalues, and the corresponding eigenvector matrix is V (where the columns are the eigenvectors), you need to create a matrix A such that:

    • A has N columns
    • Each row of ‘A’ has 1’s in places corresponding to the eigenvalues you want to sum. I.e., A(i,[1 ,2]) = 1 if you want to sum the first and second eigenvectors.
    • The number of rows in A is the number of outputs you are looking for (the number of bins).

    The result of A*V’ will be a matrix where each row is the sum of eigenvectors you are looking for.

    I’ll leave it to you to determine how to construct the matrix A from the linspace vector you have. This may require a simple loop.

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

Sidebar

Related Questions

I have a matrix ('data') which is composed of day of year in the
Have just started using Visual Studio Professional's built-in unit testing features, which as I
Have you refactored from an ActiveRecord to a DataMapper pattern? What conditions prompted the
I have a function (neural network model) which produces figures. I wish to test
I have a Python script which needs to calculate the exact size of arbitrary
Have a photography site that I want to prevent image copying from. How can
Have created a ATL COM project through which I am inserting Menu Items to
I have a MATLAB routine with one rather obvious bottleneck. I've profiled the function,
Have anyone used Redmine Documentor which lets you convert PHP to HTML to Redmine
I'm relatively new to python and scipy, being a convert from MATLAB. I was

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.