[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: data structure in LL



> 4. Question: Is Matlab's matrix type heterogeneous?

Matlab's matrix type is very complicated.  At first blush, it is a 2D
matrix of complex double elements.  It is really good at saving bits,
however.  Sparse matrices, scalars, real matrices, bit matrices, 8-bit
matrices, strings packed into matrices of characters, etc. are all
special cased [mostly] under the covers.

Some horrible things have recently crept into Matlab (cell arrays), but
in general, *everything* is a matrix in Matlab and all functions can
operate on all kinds of matrices (sort of).  So, while the
implementation is heterogeneous, they are semantically homogenous.

I think some Lisp implementations play games like this with lists,
changing the implementation around for performance when no-one is
looking.

-m


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com