smat {sdpt3r} | R Documentation

## Create a Symmetrix Matrix

### Description

`smat` takes a vector and creates a symmetrix matrix

### Usage

    smat(blk, p, At, isspM = NULL)

### Arguments

`blk` | Lx2 matrix detailing the type of matrices ("s", "q", "l", "u"), and the size of each matrix
`p` | Row of blk to be used during matrix creation
`At` | vector to be turned into a symmetric matrix
`isspM` | if At is sparse, isspx = 1, 0 otherwise. Default is to assume M is dense.

### Value

`M` | A Symmetric Matrix

### Examples

    y <- c(1,0.00000279, 3.245, 2.140, 2.44, 2.321, 4.566)

    blk <- matrix(list(),1,2)
    blk[[1,1]] <- "s"
    blk[[1,2]] <- 3

    P <- smat(blk,1, y)

[Package sdpt3r version 0.3 Index]