Thanks Liz, I think the fog might be starting to clear...
My initial try with "V" did not work, but I'm going to keep pecking at it. If a double is represented in C with 32 bits, then "V" makes sense to me. However, I am working on a networked Sun Station, so I think I will try "N" also. I have no idea what a big-endian and little-endian is. err...YMMV? Your Resident Rookie...Brady -----Original Message----- From: Elizabeth Mattijsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 11, 2002 2:32 AM To: bbcannon; Neil Watkiss Cc: '[EMAIL PROTECTED]' Subject: RE: Instantiating arrays with Inline At 04:55 PM 6/10/02 -0600, bbcannon wrote: >I tried passing $list as the C array of doubles to >mlfDoubleMatrix() to create a mxArray, and it didn't >like it. >I tried using "d" instead of "L*" which didn't work either. >Do you know if pack() can be used to create an "actual" >C array of doubles? Have you looked at the perl documentation for -pack-? "d" is for double-precision floats, you need double (32bit) ints, right? =========================================================================== i A signed integer value. I An unsigned integer value. (This 'integer' is _at_least_ 32 bits wide. Its exact size depends on what a local C compiler calls 'int', and may even be larger than the 'long' described in the next item.) l A signed long value. L An unsigned long value. (This 'long' is _exactly_ 32 bits, which may differ from what a local C compiler calls 'long'. If you want native-length longs, use the '!' suffix.) n An unsigned short in "network" (big-endian) order. N An unsigned long in "network" (big-endian) order. v An unsigned short in "VAX" (little-endian) order. V An unsigned long in "VAX" (little-endian) order. (These 'shorts' and 'longs' are _exactly_ 16 bits and _exactly_ 32 bits, respectively.) =========================================================================== YMMV... Liz
