GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • YALMIP
  • Download
  • Tutorials
  • Examples
  • Inside
  • Commands
  • Solvers
  • Index
  • FAQ
  • References
  • Forum
  • Search
  • sdpvar
  • optimize

This view

  • Original page
  • New address

GeezerVison is showing yalmip.github.io — getvariables

getvariables returns the internal index associated with an sdpvar variable

Syntax

k = getvariables(x)

Examples

sdpvar variables are built-up from internal variable indicies (i.e., the only internal name and reference is an integer).

yalmip('clear')
x = sdpvar(1);
getvariables(x)

ans = 
    1

y = sdpvar(2,3);
getvariables(y)
ans = 
    2 3 4 5 6 7 

Also nonlinear terms have internal indicies (and assosciated structures to explain how the term relates to other linear variables)

z = x^2;
getvariables(z)
ans = 
    8

Expressions are built up from variables

z = x + 3*x^2;
getvariables(z)
ans = 
    1 8

Commnents

In most situations you typically use depends which returns the index to the involved linear variables.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.