How to find an optimized matrix by changing the elements of another matrix?

4 views (last 30 days)
Suppose we have three 10x10 complex matrices and the following equation: R = T * X. Here T is a given fixed matrix.
Now, we want to find the optimized R (I'll explain what "optimized" means) by modifying X. We need to fill X with given four different elements such that at the end we obtain the matrix R which satisfies: abs(R(5,5)).^2 = maximum and other elements of abs(R ).^2 are as minimum as possible. So, this is actually related to obtaining a focus at a given target point (5,5) at the end.
What I tried initially was to choose X = ones(10,10) and then I changed every index of X with 4 given elements, do the multiplication T * X for every 4 elements separately and calculate abs(R(5,5)).^2 for each of them. Then I've chosen the single number inside of these 4 that gives the maximum value for abs(R(5,5)).^2. Repeating that for every index of X, I hoped to find the optimized pattern but I failed.
In my second try, inside a loop I created random X matrices with the given 4 elements and do the calculation T*X for every random X with the condition max(max(abs(R ).^2)) = abs(R(5,5)).^2. But, this code is also not working perfectly. It is taking too much time and I'm not able to find a good looking focused point at (5,5).
So, I need your help in approaching this problem. How should I proceed?

Answers (1)

Matt J
Matt J on 23 Sep 2018
Well, you have to pick an objective function that represents the desired balance between R(5,5) and the other elements. One candidate is
min. R(5,5)^2 - sum R(i,j)^2
Once you do, however, it looks like it should be straightforward to solve with fmincon, if you have the Optimization Toolbox.
  2 Comments
Sahin Kurekci
Sahin Kurekci on 23 Sep 2018
Thanks for your answer @Matt J, but since I'm fairly new to programming I didn't understand it very well. I just checked the fmincon function and it seemed a little bit confusing to me. Additionally, in writing your objective function did you mean min(R(5,5)^2 - sum(R(i,j))^2)? Can you expand your answer further by giving more details?

Sign in to comment.

Products


Release

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!