# Linear Matrix Inequality

**URL:** https://discourse.julialang.org/t/linear-matrix-inequality/65814
**Category:** Optimization (Mathematical)
**Tags:** optimization, convex-optimization
**Created:** [August 4, 2021, 2:04pm UTC](https://discourse.julialang.org/t/linear-matrix-inequality/65814 "2021-08-04T14:04:56Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![jeanluc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeanluc/32/27838_2.png) [@jeanluc](https://discourse.julialang.org/u/jeanluc)
#### Post date: [August 4, 2021, 2:04pm UTC](https://discourse.julialang.org/t/linear-matrix-inequality/65814/1 "2021-08-04T14:04:56Z")

</div>

Hello everyone!

Here is a code I have tried to solve an LMI

But it failed.

How can I fix it? Will this code give the solution?

```julia
using Convex
using SCS
using LinearAlgebra
n = 2
P = Semidefinite(n)
Z12=zeros(Int8, 2, 2)
Z13=zeros(Int8, 2, 2)
Z14=zeros(Int8, 2, 2)
Z15=zeros(Int8, 2, 2)
Z16=zeros(Int8, 2, 2)
Z21=zeros(Int8, 2, 2)
Z23=zeros(Int8, 2, 2)
Z24=zeros(Int8, 2, 2)
Z25=zeros(Int8, 2, 2)
Z26=zeros(Int8, 2, 2)
Z31=zeros(Int8, 2, 2)
Z32=zeros(Int8, 2, 2)
Z34=zeros(Int8, 2, 2)
Z35=zeros(Int8, 2, 2)
Z36=zeros(Int8, 2, 2)
Z41=zeros(Int8, 2, 2)
Z42=zeros(Int8, 2, 2)
Z43=zeros(Int8, 2, 2)
Z45=zeros(Int8, 2, 2)
Z46=zeros(Int8, 2, 2)
Z51=zeros(Int8, 2, 2)
Z52=zeros(Int8, 2, 2)
Z53=zeros(Int8, 2, 2)
Z54=zeros(Int8, 2, 2)
Z56=zeros(Int8, 2, 2)
Z61=zeros(Int8, 2, 2)
Z62=zeros(Int8, 2, 2)
Z63=zeros(Int8, 2, 2)
Z64=zeros(Int8, 2, 2)
Z65=zeros(Int8, 2, 2)
P1=[1.1 0; 0 1.1]
P2=[2.1 0; 0 2.1]
P3=[3.1 0; 0 3.1]
P4=[4.1 0; 0 4.1]
P5=[5.1 0; 0 5.1]
P6=[6.1 0; 0 6.1]
Id=1*Matrix{Float64}(I, 12, 12)
C=1*Matrix{Float64}(I, 2, 2)
R=1*Matrix{Float64}(I, 2, 2)
S=0.3*Matrix{Float64}(I, 2, 2)
Q2=3*Matrix{Float64}(I, 2, 2)
Q1=2*Matrix{Float64}(I, 2, 2)
B=0.0001*Matrix{Float64}(I, 2, 2)
Q =[-2 1; 1 -3]
A = [0 1; 0 -0.5]
P1VARON=inv(P1)
P2VARON=inv(P2)
P3VARON=inv(P3)
P4VARON=inv(P4)
P5VARON=inv(P5)
P6VARON=inv(P6)
rho = Variable()
elementmatone=A'*P+P'A-C'*Q*C-rho*P+(P1+P2+P3+P4+P5)*1/2
R1=[elementmatone Z12 Z13 Z14 Z15 Z16]
R2=[Z21 2*P*P1VARON*P' Z13 Z14 Z15 Z16]
R3=[Z31 Z32 B'*P*P2VARON*P'*B Z34 Z35 Z36]
R4=[Z41 Z42 Z43 2*P*P3VARON*P' Z45 Z46]
R5=[Z51 Z52 Z53 Z54 B'*P4VARON*B Z56]
R6=[Z61 Z62 Z63 Z64 Z65 (2*P-C'*S)*P5VARON]
LMI1=[-R1;-R2;-R3;-R4;-R5;-R6]
p.objective = rho
p.constraints = [(LMI1>Id),(P>0)]
p = minimize(rho, constraints)
solve!(p)

```

Here is the error I got

```julia
julia> using Convex

julia> using SCS

julia> using LinearAlgebra

julia> n = 2
2

julia> P = Semidefinite(n)
Variable
size: (2, 2)
sign: real
vexity: affine
id: 106…234

julia> Z12=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z13=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z14=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z15=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z16=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z21=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z23=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z24=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z25=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z26=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z31=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z32=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z34=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z35=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z36=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z41=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z42=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z43=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z45=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z46=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z51=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z52=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z53=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z54=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z56=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z61=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z62=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z63=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z64=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> Z65=zeros(Int8, 2, 2)
2×2 Matrix{Int8}:
 0 0
 0 0

julia> P1=[1.1 0; 0 1.1]
2×2 Matrix{Float64}:
 1.1 0.0
 0.0 1.1

julia> P2=[2.1 0; 0 2.1]
2×2 Matrix{Float64}:
 2.1 0.0
 0.0 2.1

julia> P3=[3.1 0; 0 3.1]
2×2 Matrix{Float64}:
 3.1 0.0
 0.0 3.1

julia> P4=[4.1 0; 0 4.1]
2×2 Matrix{Float64}:
 4.1 0.0
 0.0 4.1

julia> P5=[5.1 0; 0 5.1]
2×2 Matrix{Float64}:
 5.1 0.0
 0.0 5.1

julia> P6=[6.1 0; 0 6.1]
2×2 Matrix{Float64}:
 6.1 0.0
 0.0 6.1

julia> Id=1*Matrix{Float64}(I, 12, 12)
12×12 Matrix{Float64}:
 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0

julia> C=1*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 1.0 0.0
 0.0 1.0

julia> R=1*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 1.0 0.0
 0.0 1.0

julia> S=0.3*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 0.3 0.0
 0.0 0.3

julia> Q2=3*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 3.0 0.0
 0.0 3.0

julia> Q1=2*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 2.0 0.0
 0.0 2.0

julia> B=0.0001*Matrix{Float64}(I, 2, 2)
2×2 Matrix{Float64}:
 0.0001 0.0
 0.0 0.0001

julia> Q =[-2 1; 1 -3]
2×2 Matrix{Int64}:
 -2 1
  1 -3

julia> A = [0 1; 0 -0.5]
2×2 Matrix{Float64}:
 0.0 1.0
 0.0 -0.5

julia> P1VARON=inv(P1)
2×2 Matrix{Float64}:
 0.909091 0.0
 0.0 0.909091

julia> P2VARON=inv(P2)
2×2 Matrix{Float64}:
 0.47619 0.0
 0.0 0.47619

julia> P3VARON=inv(P3)
2×2 Matrix{Float64}:
 0.322581 0.0
 0.0 0.322581

julia> P4VARON=inv(P4)
2×2 Matrix{Float64}:
 0.243902 0.0
 0.0 0.243902

julia> P5VARON=inv(P5)
2×2 Matrix{Float64}:
 0.196078 0.0
 0.0 0.196078

julia> P6VARON=inv(P6)
2×2 Matrix{Float64}:
 0.163934 0.0
 0.0 0.163934

julia> rho = Variable()
Variable
size: (1, 1)
sign: real
vexity: affine
id: 243…140

julia> elementmatone=A'*P+P'A-C'*Q*C-rho*P+(P1+P2+P3+P4+P5)*1/2
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
+ (Convex.NotDcp; real)
├─ * (affine; real)
│ ├─ 2×2 adjoint(::Matrix{Float64}) with eltype Float64
│ └─ 2×2 real variable (id: 106…234)
├─ * (affine; real)
│ ├─ adjoint (affine; real)
│ │ └─ 2×2 real variable (id: 106…234)
│ └─ 2×2 Matrix{Float64}
├─ 2×2 Matrix{Float64}
├─ - (Convex.NotDcp; real)
│ └─ * (Convex.NotDcp; real)
│ ├─ real variable (id: 243…140)
│ └─ 2×2 real variable (id: 106…234)
└─ 2×2 Matrix{Float64}

julia> R1=[elementmatone Z12 Z13 Z14 Z15 Z16]
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
├─ + (Convex.NotDcp; real)
│ ├─ * (affine; real)
│ │ ├─ 2×2 adjoint(::Matrix{Float64}) with eltype Float64
│ │ └─ 2×2 real variable (id: 106…234)
│ ├─ * (affine; real)
│ │ ├─ adjoint (affine; real)
│ │ │ └─ …
│ │ └─ 2×2 Matrix{Float64}
│ ├─ 2×2 Matrix{Float64}
│ ├─ - (Convex.NotDcp; real)
│ │ └─ * (Convex.NotDcp; real)
│ │ ├─ …
│ │ └─ …
│ └─ 2×2 Matrix{Float64}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
└─ 2×2 Matrix{Int8}

julia> R2=[Z21 2*P*P1VARON*P' Z13 Z14 Z15 Z16]
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
├─ 2×2 Matrix{Int8}
├─ * (Convex.NotDcp; real)
│ ├─ * (affine; real)
│ │ ├─ * (affine; real)
│ │ │ ├─ …
│ │ │ └─ …
│ │ └─ 2×2 Matrix{Float64}
│ └─ adjoint (affine; real)
│ └─ 2×2 real variable (id: 106…234)
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
└─ 2×2 Matrix{Int8}

julia> R3=[Z31 Z32 B'*P*P2VARON*P'*B Z34 Z35 Z36]
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ * (Convex.NotDcp; real)
│ ├─ * (Convex.NotDcp; real)
│ │ ├─ * (affine; real)
│ │ │ ├─ …
│ │ │ └─ …
│ │ └─ adjoint (affine; real)
│ │ └─ …
│ └─ 2×2 Matrix{Float64}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
└─ 2×2 Matrix{Int8}

julia> R4=[Z41 Z42 Z43 2*P*P3VARON*P' Z45 Z46]
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
hcat (Convex.NotDcp; real)
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ * (Convex.NotDcp; real)
│ ├─ * (affine; real)
│ │ ├─ * (affine; real)
│ │ │ ├─ …
│ │ │ └─ …
│ │ └─ 2×2 Matrix{Float64}
│ └─ adjoint (affine; real)
│ └─ 2×2 real variable (id: 106…234)
├─ 2×2 Matrix{Int8}
└─ 2×2 Matrix{Int8}

julia> R5=[Z51 Z52 Z53 Z54 B'*P4VARON*B Z56]
2×12 Matrix{Float64}:
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.43902e-9 0.0 0.0 0.0
 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.43902e-9 0.0 0.0

julia> R6=[Z61 Z62 Z63 Z64 Z65 (2*P-C'*S)*P5VARON]
hcat (affine; real)
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
├─ 2×2 Matrix{Int8}
└─ * (affine; real)
   ├─ + (affine; real)
   │ ├─ * (affine; real)
   │ │ ├─ …
   │ │ └─ …
   │ └─ 2×2 Matrix{Float64}
   └─ 2×2 Matrix{Float64}

julia> LMI1=[-R1;-R2;-R3;-R4;-R5;-R6]
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
┌ Warning: Expression not DCP compliant. Trying to solve non-DCP compliant problems can lead to unexpected behavior.
└ @ Convex C:\Users\user\.julia\packages\Convex\UNspE\src\dcp.jl:25
transpose (Convex.NotDcp; real)
└─ hcat (Convex.NotDcp; real)
   ├─ transpose (Convex.NotDcp; real)
   │ └─ - (Convex.NotDcp; real)
   │ └─ …
   ├─ transpose (Convex.NotDcp; real)
   │ └─ - (Convex.NotDcp; real)
   │ └─ …
   ├─ transpose (Convex.NotDcp; real)
   │ └─ - (Convex.NotDcp; real)
   │ └─ …
   ├─ transpose (Convex.NotDcp; real)
   │ └─ - (Convex.NotDcp; real)
   │ └─ …
   ├─ transpose (constant; negative)
   │ └─ 2×12 Matrix{Float64}
   └─ transpose (affine; real)
      └─ - (affine; real)
         └─ …

julia> p.objective = rho
ERROR: UndefVarError: p not defined
Stacktrace:
 [1] top-level scope
   @ REPL[66]:1

julia> p.constraints = [(LMI1>Id),(P>0)]
ERROR: UndefVarError: p not defined
Stacktrace:
 [1] top-level scope
   @ REPL[67]:1

julia> p = minimize(rho, constraints)
ERROR: MethodError: no method matching minimize(::Variable, ::typeof(constraints))
Closest candidates are:
  minimize(::Convex.AbstractExpr) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:74
  minimize(::Convex.AbstractExpr, ::Constraint...; numeric_type) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:72
  minimize(::Convex.AbstractExpr, ::Array{var"#s39", N} where {var"#s39"<:Constraint, N}; numeric_type) at C:\Users\user\.julia\packages\Convex\UNspE\src\problems.jl:74
Stacktrace:
 [1] top-level scope
   @ REPL[68]:1

julia> solve!(p)
ERROR: UndefVarError: p not defined
Stacktrace:
 [1] top-level scope
   @ REPL[69]:1

```

Any assistance you can provide would be greatly appreciated.

---

_[View the full topic](https://discourse.julialang.org/t/linear-matrix-inequality/65814)._
