Optimizing the entries of a matrix. Finding an analytic solution as a function of the entries

Dear all Lets say you have a 2x2 matrix A=[a b,(s-c) d]. You want to find the constants a,b,c,d such as det(A)=0 and the real part of s is as small as possible. Are there any easy ways to do this? I've tried going through all a,b,c,d with for-loops to visualize the solution. This was however very time-consuming for the general case (my code might be bad=)) I'm very grateful for all suggestions

Answers (1)

eg
abcd = reshape(randi(12,2,1)*[1,.35],[],1);

1 Comment

Hi!
Thank you for your response!
As I understand, your command creates "kind of" 4x1 random vector? I don't know how to use it to solve my problem. A general algorithm is needed since I need this to work on arbitrary large matrices containing polynoms of s (order 10).
Regards, Hannes

Sign in to comment.

Asked:

on 13 Mar 2012

Community Treasure Hunt

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

Start Hunting!