Foreword
This document contains a list of some Matlab basis functions and compare them with the Scilab equivalent functions if there are. It gives the main differences and gives examples of particular cases.

However not all Matlab and Scilab functions are described here.

Equivalents for operators and variables can be found at the end of this document.

Caution:
This document is not dedicated to explain how functions work. Users can used online manuals of Matlab and Scilab for it.

How to use this HTML guide:
To have more details about functions and examples, clic on the "triangles" just at the left of Matlab function name.
To have a more detailed index, clic on the letters and keywords.

Matlab A

abs Absolute value and complex magnitude abs

acosh Inverse hyperbolic cosine acosh

acos Inverse cosine acos

acoth(A) Inverse hyperbolic cotangent atanh(1 ./A)

acot(A) Inverse cotangent atan(1 ./A)

acsch(A) Inverse hyperbolic cosecant asinh(1 ./A)

acsc(A) Inverse cosecant asin(1 ./A)

all Test to determine if all elements are nonzero and

angle(A) Phase angle atan(imag(A),real(A))

any Test to determine if any nonzeros elements or

asech(A) Inverse hyperbolic secant acosh(1 ./A)

asec(A) Inverse secant acos(1 ./A)

asinh Inverse hyperbolic sine asinh

asin Inverse sine asin

atan2 Four-quadrant inverse tangent atan2

atanh Inverse hyperbolic tangent atanh

atan Two-quadrant inverse tangent atan

Matlab B

balance Diagonal scaling to improve eigenvalue accuracy balanc

barh Bar histogram horizontal barh

bar Bar histogram bar

beep Produce a beep sound beep

besseli Modified Bessel functions of the first kind besseli

besselj Bessel functions of the first kind besselj

besselk Modified Bessel functions of the second kind besselk

bessely Bessel functions of the second kind bessely

beta Beta function beta

bin2dec Returns the integer corresponding to a Given binary representation bin2dec

bitand The AND of two integers bitand

bitcmp The binary complementary of an integer bitcmp

bitget Gets the bit of an integer whose the positon is given in the input argument bitget

bitor The OR of two integers bitor

bitxor Returns the exclusive OR of two integers bitxor

blanks A string of blanks No equivalent

box Display axes border No equivalent

break Terminate execution of a for loop or while loop break

Matlab C

case Case switch case

cat Arrays concatenation cat

cd Change/get working directory cd

ceil Round up ceil

cell2mat Convert a cell array into a matrix cell2mat

cellstr Convert strings vector (or strings matrix) into a cell of strings cellstr

cell Create cell array cell

chol Cholesky factorization chol

cla Clear current axes No equivalent

clc Clear Command Window clc([nblines])

clear Remove items from workspace, freeing up system memory clear

clf Clear current figure window clf

clock Current time as a date vector No equivalent

closereq Default figure close request function delete(gcf())

close Delete specified figure close ↔ xdel ↔ delete

colordef Set default property values to display different color schemes No equivalent

complex Returns the complex form corresponding to the given real part and imaginary part complex

conj Complex conjugate conj

continue Keyword to pass control to the next iteration of a loop continue

conv Convolution convol

cosh Hyperbolic cosine cosh

cos Cosine cos

coth Hyperbolic cotangent coth

cot Cotangent cotg

cputime Elapsed CPU time timer()

csch(A) Hyperbolic cosecant 1 ./sinh(A)

csc(A) Cosecant 1 ./sin(A)

cumprod Cumulative product cumprod

cumsum Cumulative sum cumsum

Matlab D

date Current date string date()

dec2bin The binary representation of a decimal number dec2bin

dec2hex Decimal to hexadecimal number conversion dec2hex

delete Delete files or graphics objects mdelete ↔ delete

det Determinant det

diag Diagonal including or extracting diag

diary Save session to a file diary

diff Differences and approximate derivatives diff

dir Display directory listing dir

display Overloaded method to display an object display

disp Display text or array disp

docopt Web browser for UNIX platforms No equivalent

doc Display online documentation help

dos Execute a UNIX command and return result unix_g

double Conversion to double precision double

drawnow Complete pending drawing events No equivalent

Matlab E

echo Echo lines during execution mode

eig Find eigenvalues and eigenvectors spec ↔ bdiag

elseif Conditionally execute statements elseif

else Conditionally execute statements else

end Terminate loops and conditionals end

erfcx Scaled complementary error function erfcx

erfc Complementary error function erfc

erf Error function erf

error Display error messages error

etime Elapsed time etime

eval Execute a string containing an instruction/expression evstr ↔ execstr

exist Check if a variable or file exists exist

exit Ends current session exit

expm Matrix exponential expm

exp Exponential exp

eye Identity matrix eye

Matlab F

factor Prime numbers decomposition factor

false False array No equivalent

fclose Close one or more open files mclose

feof Test for end-of-file meof

ferror Query about errors in file input or output mclearerr ↔ merror

feval Function evaluation evstr ↔ execstr

fftshift Shift zero-frequency component of discrete Fourier transform to center of spectrum fftshift

fft(A[,...]) Discrete Fourier transform fft(A,-1[,...])

fgetl Read line(s) from file, discard newline character mgetl

fgets Read line from file, keep newline character fgetstr

fileparts Return filename parts fileparts

filesep Return the directory separator for this platform No equivalent

findstr Find one string within another No equivalent

find Find indices and values of nonzero elements find

fix Round towards zero fix

fliplr(A) Flip matrix in left/right direction A(:,$:-1:1)

flipud(A) Flip matrix in up/down direction A($:-1:1,:)

floor Round down floor

fopen Open a file or obtain information about open files mopen

format Control display format for output format

for Repeat statements a specific number of times for

fprintf Write formatted data to file No equivalent

fread Read binary data to a file No equivalent

frewind(fid) Move the file position indicator to the beginning of an open file mseek("0",fid)

fscanf Read formatted data to file No equivalent

fseek Set file position indicator mseek

ftell Get file position indicator mtell

fullfile Build a full filename from parts fullfile

full Convert sparse matrix to full matrix full

function Function definition function

fwrite Write binary data to a file No equivalent

Matlab G

gammaln Logarithm of gamma function gammaln

gamma Gamma function gamma

getenv Get environment variable getenv

global Define a global variable global

graymon Set graphics defaults for gray-scale monitors No equivalent

grid Grid lines for two- and three-dimensional plots No equivalent

Matlab H

hankel Hankel matrix hank

helpbrowser Display Help browser for access to full online documentation help

helpdesk Display Help browser help

helpwin Provide access to and display help for all functions help

help Display help help

hess Hessenberg form of a matrix hess

hold Hold current graph No equivalent

home Move the cursor to the upper left corner of the Command Window tohome

horzcat Horizontal concatenation No equivalent

Matlab I

ifft(A[,...]) Inverse discrete Fourier transform fft(A,1[,...])

if Conditionally execute statements if

imag Complex imaginary part imag

input Request user input input

int16 Convert to 16-bit signed integer int16

int32 Convert to 32-bit signed integer int32

int8 Convert to 8-bit signed integer int8

interp1 One_dimension interpolation function interp1

inv Matrix inverse inv

isa Detect an object of a given type No equivalent

iscell(A) Determine if input is a cell array typeof(A)=="ce"

ischar(A) Determine if item is a character array type(A)==10

isdir Determine if item is a directory isdir

isempty True for empty matrix isempty

isequal Determine if arrays are numerically equal isequal

isfield Determine if input is a structure array field No equivalent

isfinite True for finite elements No equivalent

isglobal Determine if item is a global variable isglobal

ishandle(A) Determines if values are valid graphics object handles type(A)==9

ishold Return hold state No equivalent

isinf True for infinite elements isinf

isinteger(A) Detect whether an array has integer data type type(A)==8

isletter True for letters of the alphabet No equivalent

islogical(A) Determine if item is a logical array No equivalent

isnan Detect NaN elements of an array isnan

isnumeric(A) Determine if input is a numeric array No equivalent

ispc Determine if PC (Windows) version MSDOS

isreal Determine if all array elements are real numbers isreal

isscalar(A) Determine if input is scalar sum(length(A))==1

isspace Detect elements that are ASCII white spaces No equivalent

issparse(S) Test if matrix is sparse No equivalent

isstruct(A) Determine if input is a structure array typeof(A)=="st"

isstr(A) Determine if item is a character array type(A)==10

isunix Determine if Unix version ~MSDOS

isvector Determine if input is a vector No equivalent

Matlab K

keyboard Invoke the keyboard in a file pause

kron(A,B) Kronecker tensor product A .*. B

Matlab L

length(A) Length of vector No equivalent

linspace Linearly spaced vector linspace

load Load workspace variables from disk loadmatfile

log10 Common (base 10) logarithm log10

log2 Base 2 logarithm and dissect floating point number log2 ↔ frexp

logical(A) Convert numeric values to logical No equivalent

log Natural logarithm log

lookfor Search for specified keyword in all help entries apropos

lower(str) Convert string to lower case convstr(str,''u'')

lu LU matrix factorization lu

Matlab M

max Maximum max

min Minimum min

mkdir mkdir

mod Modulus after division pmodulo

more Display Command Window output one screenful at a time lines

Matlab N

nargin ↔ nargin('fun') Number of function input arguments argn(2) ↔ size(getfield(1,macrovar(fun)),"*")

nargout ↔ nargout('fun') Number of function output arguments argn(1) ↔ size(getfield(2,macrovar(fun)),"*")

ndims Number of array dimensions No equivalent

norm Vector and matrix norms norm

num2str Number to string conversion string ↔ msprintf

Matlab O

ones Create an array of all ones ones

otherwise Default part of switch/select statement else

Matlab P

pause Halt execution temporarily xpause ↔ halt

perms Array of all permutations of vector components perms

permute Permute the dimensions of an array permute

pie circular graphic pie

plot Linear 2-D plot plot

pow2 Base 2 power and scale floating-point numbers No equivalent

primes Returns the primes numbers included between 1 and given number primes

prod Product of array elements prod

Matlab Q

qr Orthogonal-triangular decomposition qr

quit Terminate session quit

Matlab R

randn(A) Normally distributed random numbers and arrays rand(A,''normal'')

rand(A) Uniformly distributed random numbers and arrays rand(A[,''uniform''])

rcond Matrix reciprocal condition number estimate rcond

realmax Largest positive floating-point number number_properties("huge")

realmin Smallest positive floating-point number number_properties("tiny")

real Real part of a complex number real

rem(X,Y) Remainder after division X-fix(X./Y).*Y

repmat Replicate and tile an array No equivalent

reshape Reshape array matrix

return Return to the invoking function return

round Round to nearest integer round

Matlab S

save Save workspace variables from disk mtlb_save

schur Schur decomposition schur

setstr Set string flag ascii

sign Signum function sign

sinh Hyperbolic sine sinh

sin Sine sin

size Array dimension size

sort Sort elements in ascending order No equivalent

sparse Create sparse matrix sparse

sqrt Square root sqrt

strcmpi(str1,str2) Compare strings ignoring case convstr(str1)==convstr(str2)

strcmp(str1,str2) Compare strings str1==str2

strfind Find one string within another strindex

strrep String search and replace strsubst

struct Create struct array struct

sum Sum of array elements sum

surf 3-D surface plot surf

svd Singular value decomposition svd

switch Switch among several cases based on expression select

Matlab T

tanh Hyperbolic tangent tanh

tan Tangent tan

tic Starts a stopwatch timer tic()

title Display a title on a graphic window title

toc Read the stopwatch timer toc()

toeplitz Toeplitz matrix toeplitz

tril Lower triangular part of a matrix tril

triu Upper triangular part of a matrix triu

true True array No equivalent

type List file No equivalent

Matlab U

uigetdir Standard dialog box for selecting a directory tk_getdir

uint16 Convert to 16-bit unsigned integer uint16

uint32 Convert to 32-bit unsigned integer uint32

uint8 Convert to 8-bit unsigned integer uint8

unix Execute a UNIX command and return result unix_g

upper(str) Convert string to upper case convstr(str,''u'')

Matlab V

varargin Pass variable numbers of arguments varargin

varargout Return variable numbers of arguments varargout

vertcat Vertical concatenation No equivalent

Matlab W

waitforbuttonpress Wait for key or mouse button press No equivalent

warning Display warning messages warning

while Repeat statements an indefinite number of times while

whos List variables in the workspace whos

who List variables in the workspace who

winqueryreg Get item from Microsoft Windows registry winqueryreg

Matlab X

xlabel Display a string along the x axis xlabel

Matlab Y

ylabel Display a string along the y axis ylabel

Matlab Z

zeros Create an array of all zeros zeros

zlabel Display a string along the z axis zlabel

Matlab Operators

: Colon :

+ Plus +

- Minus -

* Mutiplication *

/ Right division /

\ Left division \

== Equal to ==

.* Elementwise mutiplication .*

./ Elementwise right division ./

.\ Elementwise left division .\

.' Elementwise transpose .'

.^ Elementwise exponent .^

' Transpose '

& Logical AND &

| Logical OR |

> Greater than >

>= Greater or equal to >=

< Smaller than <

<= Smaller or equal to <=

^ Exponent ^

~ Negation ~

~= Not equal to ~=

Matlab Variables

ans The most recent answer ans

end (index) Last index $

eps Floating-point relative accuracy %eps

i Imaginary unit %i

j Imaginary unit %i

pi Ratio of a circle's circumference to its diameter %pi