comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Matlab to IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Matlab to IDL [message #36717 is a reply to message #36627] Mon, 13 October 2003 03:04 Go to previous messageGo to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
dino nicola wrote:
> hi! i'm trying to translate this Matlab script into IDL, but the image
> I show is not right.
>
> function [RAD]=read_1rad(i_pr,Directory,prefix)
> i_pr
> Directory
> CONC=[Directory prefix]
> nome=[ CONC num2str(i_pr) '.sdt']
> FID=0;
> FID=fopen(nome,'r','ieee-be');

The ieee-be option indicates your data is big endian.

> [RAD,c]=fread(FID,[1024,512],'float32');
> figure(3), imshow(RAD,[ ]); title(' proiezione ')
> fclose(FID);
> colormap(gray(512));
>
>
> Here is the IDL script:
>
> file='c:\pcon_1.sdt'
> rad=fltarr(1024,512)
> openr,lun,file,/get_lun

to read big endian data in IDL on a little endian system you need to append
the /SWAP_ENDIAN keyword to openr.

What hardware are you running IDL on?



--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLWAVE Mac OS X
Next Topic: Tutorial: Using idl in java applications

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 08:58:40 PDT 2025

Total time taken to generate the page: 0.40263 seconds