rhs

Right side of an equation.

Category: Mathematics > Formula Manipulation and Simplification

Syntax

R = rhs(eq)

Returns the right-hand side of eq, element by element for an array of equations.

Description

rhs is the companion of lhs. It is often used to read a value out of a solution written as an equation, such as the output of isolate, rhs(isolate(eq, x)).

Input arguments

eq
Symbolic equation or array of equations.

Output arguments

R
Symbolic expression or array.

Example

Right sides of a system

syms x y
eq = [x + y == 2, x - y == 0];
lhs(eq)
rhs(eq)
Output
ans = 
[x + y, x - y]
ans = 
[2, 0]

See also

lhs isolate solve isequal