Basic Commands

McLabEn commands have a standard format:

<variable> = <expression>.

To execute the command, click Executar or press Enter.

The letters i and j stand for the imaginary unit.
If no variable is specified, the software stores the result value in the ans variable.
Variable names are case sensitive.

For a complete function list, refer to the Users Guide (Portuguese).

Common functions:
operations: + – * / ^
Complex number argument: arg(z), Arg(z)
Determinant of matrix: det(z)
Matrix dimensions: numlinhas(z), numcols(z) = numcolunas(z)
Exponential: exp(z)
Trigonometric: sen(z) = sin(z), cos(z), tan(z) = tg(z), sec(z), cossec(z) = csc(z), cotan(z) = cotg(z) senh(z) = sinh(z), cosh(z), tanh(z)
Matrix inversion: invmat(z) = inversa(z) = inverse(z)
Elemen-wise inversion: invtermos(z) ln(z) norma(A) = norm(A)
Im(z) Re(z)
dot(x;y) = prodescalar(x;y) = prodesc(x;y)
sqrt(z)
linsolve(A;b) = sistlinear(A;b) linsolvereal(A;b)
transpose(z) = transposta(z)
abs(z)
arctan(z) = arctg(z), arcsin(z) = arcsen(z), arccos(z)
Heaviside(z), Hs(z)
gama(z) = gamma(z) = fatorial(z) = factorial(z)
piso(z), floor(z) teto(z), ceil(z)
identity(n) = identidade(n)
Vander(n) = vander(n) = Vandermonde(n) = vandemonde(n)
random(p;q)=aleat(p;q) linspaceY(x0;xf;n;m)
linspaceX(x0;xf;n;m) uns(2;2), ones(3;1) linspace(x0;xf;n)
FFT(v), iFFT(v)

Examples

Example 1: Declaring variables

>> x=1
x = 1

>> a=2
a = 2

>> k=(1+i)/(j+2)
k = 0,6+0,2*i

Vector declaration:
>> v=[1 6]
v =
[1 6 ]

Matrix declaration:
>> M=[1 2;3 4]
M =
[1 2
3 4 ]

Example 2: Solving parenthesized expressions.

>> 1+2*3-8/4
ans = 5

>> 1+2*(3-8)/4
ans = -1,5

>> (1+2)*3-8/4
ans = 7

Leave a Reply

Your email address will not be published. Required fields are marked *