Learn R Programming

CVXR (version 1.0-14)

size: Size of Expression

Description

The size of an expression.

Usage

size(object)

# S4 method for ListORExpr size(object)

Value

A vector with two elements c(row, col) representing the dimensions of the expression.

Arguments

object

An Expression object.

Examples

Run this code
x <- Variable()
y <- Variable(3)
z <- Variable(3,2)

size(x)
size(y)
size(z)
size(x + y)
size(z - x)

Run the code above in your browser using DataLab