source:
proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/opt/yalmip/@sdpvar/exponents.m
Last change on this file was 37, checked in by , 14 years ago | |
---|---|
File size: 400 bytes |
Line | |
---|---|
1 | function [ML,dummy] = exponents(poly,x) |
2 | %EXPONENTS Internal function to extract powers of nonlinear expression |
3 | |
4 | % Author Johan Löfberg |
5 | % $Id: exponents.m,v 1.3 2006/08/11 11:48:15 joloef Exp $ |
6 | |
7 | mt = yalmip('monomtable'); |
8 | x_lin = getvariables(poly); |
9 | |
10 | x_var = getvariables(x); |
11 | |
12 | ML = mt(x_lin,x_var); |
13 | if any(full(poly.basis(:,1))) %any(ismember(1,poly)) |
14 | ML = [zeros(1,length(x));ML]; |
15 | end |
16 | dummy = []; |
Note: See TracBrowser
for help on using the repository browser.