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

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

Added original make3d

File size: 847 bytes
Line 
1function Y=reshape(varargin)
2%RESHAPE (overloaded)
3
4% Author Johan Löfberg
5% $Id: reshape.m,v 1.7 2006/07/26 20:17:58 joloef Exp $
6
7try
8    Y = varargin{1};
9    n = length(Y.lmi_variables);
10   
11    if (length(varargin{2}) <= 2) & nargin <=3
12        % LAZY....
13        if (Y.dim(1)==1) & (Y.dim(2)==1)
14            % BUG IN MATLAB R13 ON SPARSE SCALAR IN RESHAPE!!!!!
15            temp = reshape(reshape(full(Y.basis(:,1)),Y.dim(1),Y.dim(2)),varargin{2:end});
16        else
17            temp = reshape(reshape(Y.basis(:,1),Y.dim(1),Y.dim(2)),varargin{2:end});
18        end
19
20        % RESHAPE DOES NOT CHANGE INTERNAL DATA
21        Y.dim(1) = size(temp,1);
22        Y.dim(2) = size(temp,2);
23        % Reset info about conic terms
24        Y.conicinfo = [0 0];
25    else
26        Y = reshape(ndsdpvar(Y),varargin{2:end});
27    end
28catch
29    error(lasterr)
30end
Note: See TracBrowser for help on using the repository browser.