Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
26Activity
0 of .
Results for:
No results containing your search query
P. 1
Matlab Scilab

Matlab Scilab

Ratings: (0)|Views: 821 |Likes:
Published by teacher.lexleo2782

More info:

Published by: teacher.lexleo2782 on Mar 23, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

03/21/2012

pdf

text

original

 
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)
 In Matlab
y=acoth(x)
and Scilab
y=atanh(1 ./x)
, for real elements of 
x
 outside the domain
[-1,1]
, the complex part of Scilab
y
value is theopposite of Matlab
y
value. See
atanh
 /.
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
 Matlab
all
function can work with complexes, what Scilab
and
cannot, so a call to
abs
function can be necessary when translating fromMatlab to Scilab.
B=all(A)
B=and(A):If 
A
is a matrix,
all(A)
is equivalent to
all(A,1)
in Matlab whereas inScilab
and(A)
is a logical AND of all elements of 
A
. If 
A
is amultidimensional array then Matlab treats the values along the firstnon-singleton dimension, but Scilab returns logical AND of allelements of 
A
.
B=all(A,dim)
B=and(A,dim):In Scilab
dim=1
is equivalent to
dim=''r''
and
dim=2
is equivalent
dim=''c''
. In Matlab,
dim
can be greater then the number of dimension of 
A
(in this case,
B=A
), in Scilab you will get an errormessage.
y = all([1,1,0;1,0,1]) y = and([1,1,0;1,0,1])
 
y = [1,0,0]y = all([1,1,0;1,0,1],1)y = [1,0,0]
 
y = %Fy = and([1,1,0;1,0,1],1)y = [%T,%F,%F]
 
angle(A)
 
Phase angle
 
atan(imag(A),real(A))
 
any
 
Test to determine if any nonzeros elements
 
or
 Matlab
any
function can work with complexes, what Scilab
or
cannot, so a call to
abs
function can be necessary when translating fromMatlab to Scilab.
B=any(A)
B=or(A):If 
A
is a matrix,
any(A)
is equivalent to
any(A,1)
in Matlab whereasin Scilab
or(A)
is a logical OR of all elements of 
A
. If 
A
is amultidimensional array then Matlab treats the values along the firstnon-singleton dimension, but Scilab returns logical OR of all elementsof 
A
.
B=any(A,dim)
B=or(A,dim):In Scilab
dim=1
is equivalent to
dim=''r''
and
dim=2
is equivalent
dim=''c''
. In Matlab,
dim
can be greater then the number of dimension of 
A
(in this case,
B=A
), in Scilab you will get an errormessage.
y = any([1,1,0;1,0,1])y = [1,1,1]y = any([1,1,0;1,0,1],1)y = [1,1,1]
 
y = or([1,1,0;1,0,1])y = %Ty = or([1,1,0;1,0,1],1)y = [%T,%T,%T]
 
asech(A)
 
 Inverse hyperbolic secant 
 
acosh(1./A)
 
asec(A)
 
 Inverse secant 
 
acos(1./A)
 
asinh
 
 Inverse hyperbolic sine
 
asinh
 
asin
 
 Inverse sine
 
asin
 In y=asin(x), for real elements of x outside the domain [-1,1], thecomplex part of Scilab y value is the opposite of Matlab y value.
y = asin(2)y = 1.5708 - 1.3170i
 
y = asin(2)y = 1.5708 + 1.3170i
 
atan2
 
Four-quadrant inverse tangent 
 
atan2
 
 
 Matlab
atan2
function can work with complexes (in this case,complex part is ignored), what Scilab
atan
can not.
atanh
 
 Inverse hyperbolic tangent 
 
atanh
 In y=atanh(x), for real elements of x outside the domain [-1,1], thecomplex part of Scilab y value is the opposite of Matlab y value.
y = atanh(2)y = 0.5493 + 1.5708i
 
y = atanh(2)y = 0.5493061 - 1.5707963i
 
atan
 
Two-quadrant inverse tangent 
 
atan
 
Matlab
 
B
 
balance
 
 Diagonal scaling to improve eigenvalue accuracy
 
balanc
 There is no equivalent for
B=balance(A)
in Scilab,
balanc
functiondoes not work with only one output value.When used with two outputs, these functions return value in inverseorder.
[T,Ab] = balance(A)
 
[Ab,T] = balanc(A)
 
barh
 
 Bar histogram horizontal
 
barh
 
bar
 
 Bar histogram
 
bar
 
beep
 
Produce a beep sound 
 
beep
 Scilab
beep
always returns a value but not Matlab function.
besseli
 
 Modified Bessel functions of the first kind 
 
besseli
 Scilab
besseli
function can work with only one output argument, butthe Matlab function can work with two outputs arguments.
y = besseli(alpha,x)y = besseli(alpha,x,1)[y,ierr] =besseli(alpha,...)
 
y = besseli(alpha,x)y = besseli(alpha,x,ice),ice= 1 or ice = 2
 

Activity (26)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Plesa Ovidiu liked this
hajaress liked this
anilshaw27 liked this
williamsa01 liked this
cfellow liked this
vaishu.2101 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->