source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/extras/@ndsdpvar/subsasgn.m
@
37
Last change on this file since 37 was 37, checked in by , 14 years ago | |
---|---|
File size: 357 bytes |
Rev | Line | |
---|---|---|
[37] | 1 | function X = subsasgn(X,I,Y) |
2 | % SUBSASGN (overloaded) | |
3 | ||
4 | % Author Johan Löfberg | |
5 | % $Id: subsasgn.m,v 1.2 2006/07/13 20:37:30 joloef Exp $ | |
6 | ||
7 | base = reshape(1:size(X.basis,1),X.dim); | |
8 | base = subsref(base,I); | |
9 | ||
10 | if isa(Y,'ndsdpvar') | |
11 | Y = sdpvar(Y); | |
12 | elseif isa(Y,'double') | |
13 | Y = Y(:); | |
14 | end | |
15 | ||
16 | dim = X.dim; | |
17 | X = sdpvar(X); | |
18 | X(base) = Y; | |
19 | X = reshape(X,dim); | |
20 | X = clean(X); |
Note: See TracBrowser
for help on using the repository browser.