Well, I think that the reason why you were directed by @rafael.guerra from your original post to this post was not exactly to replicate your question here but rather to have a look at what had been discussed here. The discussion here turns out to be relevant for your need. Have you at least tried and struggled? Where exactly have you struggled?
But let me restate here for convenience: you have two options: either use JuMP or Convex to formulate your LMI feasibility problem. For this particular problem both do the job. The documentation for both contains a sufficient description how to define and solve semidefinite problems, in this case just LMI feasibility problems. Examples of usage for both packages are also above in this thread. It should not be difficult to massage those code snippets so that they address your problem.
I am eager to help you once you encounter problems.
At minimum, please, paste here a code for generating those matrices A
, B
, Q
and R
(inside triple quotes).