Line | |
---|
1 | function Z=conv(X,Y) |
---|
2 | %CONV (overloaded) |
---|
3 | |
---|
4 | % Author Johan Löfberg |
---|
5 | % $Id: conv.m,v 1.4 2006/10/18 08:48:14 joloef Exp $ |
---|
6 | |
---|
7 | if isa(X,'double') |
---|
8 | temp = X; |
---|
9 | X = Y; |
---|
10 | Y = temp; |
---|
11 | end |
---|
12 | if isa(X,'sdpvar') & isa(Y,'sdpvar') |
---|
13 | error('nonlinear CONV not supported yet. Make feature request'); |
---|
14 | end |
---|
15 | x_lmi_variables = X.lmi_variables; |
---|
16 | n = X.dim(1); |
---|
17 | m = X.dim(2); |
---|
18 | Z=X; |
---|
19 | Z.basis=[]; |
---|
20 | for i = 1:length(x_lmi_variables)+1 |
---|
21 | x=reshape(X.basis(:,i),n,m); |
---|
22 | z=conv(full(x),full(Y)); |
---|
23 | Z.basis=[Z.basis z(:)]; |
---|
24 | end |
---|
25 | Z.dim(1) = size(z,1); |
---|
26 | Z.dim(2) = size(z,2); |
---|
27 | Z = clean(Z); |
---|
28 | % Reset info about conic terms |
---|
29 | if isa(Z,'sdpvar') |
---|
30 | Z.conicinfo = [0 0]; |
---|
31 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.