How to select k elements from two vectors of length n > k that maximize the correlation between the two vectors?
2 views (last 30 days)
Show older comments
Hello everyone,
I have two numerical column vectors of length n, say vector A and vector B.
Consider a third column vector C which has k < n values equal to one, and zero otherwise.
I want C such that (A.*C)'*(B.*C) is maximized.
In other words, I need to decide which rows of A and B needs to remain (k of them needs to remain, n-k needs to me removed) to maximize the correlation between the vectors A and B. (In this sense, C can also be logical, 1 if row is in, zero if row is out)
Can you please help me to implement this maximization?
Many thanks for your help,
Marco
3 Comments
Answers (0)
See Also
Categories
Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!