I have a two-dimensional (2 x 2) transfer function matrix like this:
The aim is to solve optimization problem:
I used this code, but there is sth wrong:
syms s
s = tf('s');
x = fmincon(@(x) norm([1/(x(1)*s+1), 1/(s+0.5); 3/(s+3), 1/(x(2)*s+2),inf),[1 1],[],[],[],[],[0 0],[2 2])
How can I treat this optimization problem?
The error is:
x = fmincon(@(x) norm([1/(x(1)*s+1), 1/(s+0.5); 3/(s+3), 1/(x(2)*s+2),inf),[1 1],[],[],[],[],[0 0],[2 2])
|
Error: Unbalanced or unexpected parenthesis or bracket.
which is pretty clear. You forgot to close a bracket. It should be:
norm([1/(x(1)*s+1), 1/(s+0.5); 3/(s+3), 1/(x(2)*s+2)],inf)
Also, you don't need syms s
, s = tf('s')
is enough.