Minus {lazy.symbolic}R Documentation

Difference of Two or More Symbolic Expressions

Description

Difference of Two or More Symbolic Expressions

Usage

Minus(..., simplify = 1, debug = 0)

Arguments

...

Symbolic matrices or vectors to be subtracted.

simplify

= 0 not to use Simplify nor remove_paren
= 1 to use Simplify

debug

= 1 to print intermediate result

Details

Tow matrices of the same dimensions can be added or subtraced.
A scalar can be added to or subtracted from a matrix

Numeric matrices will be treated as character ones.

When you want to chage the sign of all the elements of a matrix, use
A1 <- Minus( 0, A ) or A1 <- Times( -1, A )
Minus( A, B, C, ...) -> A-B-C-...

If the arguments are super matrices with SMdim attributes, the final result will have an appropriate SMdim attribute.

Value

A character matrix

Examples

Minus( 3,2,1 )
A <- demomat(3,3,root="a")
A[2,2] <- paste("-",A[2,2],sep="")
B <- demomat(3,3,root="b")
B[3,3] <- 0
Minus( A, B )
Minus( A, 1 )


[Package lazy.symbolic version 0.1.4 Index]