source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/@sdpvar/conv.m @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 643 bytes
Line 
1function 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
7if isa(X,'double')
8    temp = X;
9    X = Y;
10    Y = temp;
11end
12if isa(X,'sdpvar') & isa(Y,'sdpvar')
13    error('nonlinear CONV not supported yet. Make feature request');
14end
15x_lmi_variables = X.lmi_variables;
16n = X.dim(1);
17m = X.dim(2);
18Z=X;
19Z.basis=[];
20for 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(:)];
24end   
25Z.dim(1) = size(z,1);
26Z.dim(2) = size(z,2);
27Z = clean(Z);
28% Reset info about conic terms
29if isa(Z,'sdpvar')
30    Z.conicinfo = [0 0];
31end
Note: See TracBrowser for help on using the repository browser.