06.07.2013 Views

Scilab Bag Of Tricks - Claymore

Scilab Bag Of Tricks - Claymore

Scilab Bag Of Tricks - Claymore

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Operator Code Note<br />

Chapter 4. Unknown Spots<br />

, ~= n unequality test. Both operators<br />

are automatically defined for any<br />

new type with list<br />

semantics, i.e.<br />

component-wise<br />

comparison and a boolean<br />

return vector. Both can<br />

be overloaded with user<br />

functions.<br />

== o equality test. The operator is<br />

automatically defined for any<br />

new type with list<br />

semantics, i.e.<br />

component-wise<br />

comparison and a boolean<br />

return vector. It can be<br />

overloaded with a user<br />

function.<br />

disp p unary operator; display results<br />

with disp or at the<br />

command line<br />

^ p binary operator; matrix<br />

exponentiation<br />

.\ q element-wise left division<br />

/ r right matrix division<br />

- s unary %head_s, and binary<br />

%head1_s_head2 operator;<br />

see also: overloading of<br />

unary plus %head_a.<br />

’ t unary operator, Hermitian<br />

(complex) transposition<br />

*. u element-wise multiplication<br />

/. v element-wise division<br />

\. w element-wise right division<br />

.* x element-wise multiplication<br />

./. y Kronecker division<br />

.\. z Kronecker right division<br />

Almost all unary built-in functions like abs, ceil, floor, imag, int, real, round, sqrt, and<br />

string can be overloaded, too. The syntax borrows for the syntax for unary operators. Function<br />

44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!