Operating System - HP-UX
1832870 Members
3540 Online
110048 Solutions
New Discussion

Re: Float representation HP-UX&Mac, Matlab

 
SOLVED
Go to solution
Lars Bylander
Frequent Advisor

Float representation HP-UX&Mac, Matlab

I have data files in a floating format
originating from a Mac computer. The files contains binary data. Reading the data files
on a Mac using Matlab presents the correct
data values.

Reading the data file on HP-UX using matlab
returns errenous data values.

How is the representation of floating values
done on the PA-RISC and the Mac G3? Are
their any easy ways to convert data files
between different formats (scripts or commands maybe)?

Thanks/ Lars Bylander
2 REPLIES 2
Andreas Voss
Honored Contributor
Solution

Re: Float representation HP-UX&Mac, Matlab

Hi,

i don't know the floating format of the MAC but perhaps it is the same as INTEL that swaps the lower and higher byte.
You could try the dd command to swap the bytes back:
dd if= of= conv=swab
For more info on dd use: man dd

Perhaps this helps

Regards
Cheryl Griffin
Honored Contributor

Re: Float representation HP-UX&Mac, Matlab

Lars,
I am no floating point expert, but maybe this link will help you.

HP-UX Floating-Point Guide
http://docs.hp.com/dynaweb/hpux11/dtdcen1a/b534/@Generic__BookView
"Downtime is a Crime."