How to find an optimized matrix by changing the elements of another matrix?
4 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
Matt J
2018 年 9 月 23 日
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!