Matlab reference values of a matrix less than

Define less than or equal to condition

Syntax

Description

le( A , B ) is equivalent to A

Examples

Set and Use Assumption Using Less Than or Equal To

Set the assumption that x is less than or equal to 3 by using assume .

syms x cond = x 

Solve an equation for x . The solver only returns solutions that are valid under the assumption on x .

eqn = (x-1)*(x-2)*(x-3)*(x-4) == 0; solve(eqn,x)
ans = 1 2 3

Find Values that Satisfy Condition

Set the condition abs(sin(x))

syms x cond = abs(sin(x)) 

Find multiples of π/24 that satisfy the condition by using a for loop from 0 to π.

for i = 0:sym(pi/12):sym(pi) if subs(cond, x, i) disp(i) end end
0 pi/12 pi/6 (5*pi)/6 (11*pi)/12 pi

Input Arguments

A — Input
number | vector | matrix | array | symbolic number | symbolic variable | symbolic array | symbolic function | symbolic expression

Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.

B — Input
number | vector | matrix | array | symbolic number | symbolic variable | symbolic array | symbolic function | symbolic expression

Input, specified as a number, vector, matrix, or array, or a symbolic number, variable, array, function, or expression.

Tips

Version History

Introduced in R2012a

See Also

Topics

Comando de MATLAB

Ha hecho clic en un enlace que corresponde a este comando de MATLAB:

Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.

Select a Web Site Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Americas

Europe