Matlab — Scilab survival phrasebook

This is a one-page dictionary in case you need to switch between Matlab and Scilab.

Matlab Scilab Function
acot(A) atan((1) ./A) Inverse cotangent
acoth(A) atanh((1) ./A) Inverse hyperbolic cotangent
acsc(A) asin((1) ./A) Inverse cosecant
acsch(A) asinh((1) ./A) Inverse hyperbolic cosecant
all and Test to determine if all elements are nonzero
angle(A) atan(imag(A),real(A)) Phase angle
any or Test to determine if any nonzeros elements
asec(A) acos((1) ./A) Inverse secant
asech(A) acosh((1) ./A) Inverse hyperbolic secant
atan2(y,x) atan(y,x) Four-quadrant inverse tangent
[T,Ab]=balance(A) [Ab,T]=balanc(A) Diagonal scaling to improve eigenvalue accuracy
blkdiag sysdiag Construct block diagonal matrix from input arguments
cot cotg Cotangent
cputime timer() Elapsed CPU time
csc(A) (1) ./sin(A) Cosecant
csch(A) (1) ./sinh(A) Hyperbolic cosecant
date date() Current date string
dos unix_g Execute a UNIX command and return result
eig spec ; bdiag Find eigenvalues and eigenvectors
eval evstr ; execstr Execute a string containing an instruction
fclose mclose Close one or more open files
feof meof Test for end-of-file
ferror mclearerr ; merror Query about errors in file input or output
fft(A[,...]) fft(A,-1[,...]) Discrete Fourier transform
fgetl mgetl Read line(s) from file, discard newline character
fgets fgetstr Read line from file, keep newline character
fliplr(A) A(:,$:-1:1) Flip matrix in left/right direction
flipud(A) A($:-1:1,:) Flip matrix in up/down direction
fopen mopen Open a file or obtain information about open files
frewind(fid) mseek("0",fid) Move the file position indicator to the beginning of an open file
fseek mseek Set file position indicator
ftell mtell Get file position indicator
hankel hank Hankel matrix
ifft(A[,...]) fft(A,1[,...]) Inverse discrete Fourier transform
iscell(A) typeof(A)=="ce" Determine if input is a cell array
ischar(A) type(A)==10 Determine if item is a character array
ishandle(A) type(A)==9 Determines if values are valid graphics object handles
isinteger(A) type(A)==8 Detect whether an array has integer data type
isscalar(A) sum(length(A))==1
isstr(A) type(A)==10 Determine if item is a character array
isstruct(A) typeof(A)=="st" Determine if input is a structure array
isunix getos() "Windows" Determine if Unix version
ispc (getos() == 'Windows') Determine if PC (Windows) version
kron(A,B) A .*. B Kronecker tensor product
lookfor apropos Search for specified keyword in all help entries
lower(str) convstr(str,"l") Convert string to lower case
mod pmodulo Modulus after division
nargin argn(2) Number of function input arguments
nargout argn(1) Number of function output arguments
null kernel Null space of a matrix
num2str string Number to string conversion
ones(size(A)) ones(A) Create an array of all ones
otherwise else Default part of switch/select statement
pause xpause Halt execution temporarily
prod(A,1) prod(A,"r") Product of array elements
rand(A) rand(A[,"uniform"]) Uniformly distributed random numbers and arrays
randn(A) rand(A,"normal") Normally distributed random numbers and arrays
realmax number_properties("huge") Largest positive floating-point number
realmin number_properties("tiny") Smallest positive floating-point number
rem(X,Y) X-fix(X./Y).*Y Remainder after division
reshape matrix Reshape array
strcmp(str1,str2) str1==str2 Compare strings
strfind strindex Find one string within another
strrep strsubst String search and replace
switch select Switch among several cases based on expression
tic tic() Starts a stopwatch timer
toc toc() Read the stopwatch timer
unix unix_g Execute a UNIX command and return result
upper(str) convstr(str,"u") Convert string to upper case
end (index) $ Last index
eps %eps Floating-point relative accuracy
i ; j %i Imaginary unit
pi %pi Ratio of a circle’s circumference to its diameter
Advertisements
Published in: on 14/08/2015 at 21:49  Leave a Comment  

The URI to TrackBack this entry is: https://burubaxair.wordpress.com/2015/08/14/matlab-scilab-survival-phrasebook/trackback/

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: