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

Home » Public Forums » archive » Re: Array resizing
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Array resizing [message #27988] Wed, 14 November 2001 15:48
Logan Lindquist is currently offline  Logan Lindquist
Messages: 50
Registered: October 2001
Member
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2600.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks Liam and David !</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Logan Lindquist" &lt;<A
href="mailto:llindqusit@mrdoc.cc">llindqusit@mrdoc.cc</A>&gt; wrote in message
<A
href="news:9suqq0$14k$1@sulawesi-fi.lerc.nasa.gov">news:9suqq0$14k$1@sulawesi-fi.lerc.nasa.gov</A>...</DIV>
<DIV><FONT face=Arial size=2>What's the best way to take a byte array that is
(1,256,256) and make it a byte array that is just (256, 256)? Looping would
seem to take a while. I can't figure out at this moment of a way to store the
x and y into temp variables and then recopy them into another byte array.
Maybe there is something that will just get rid of the damn 1, without doing
either. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>gracias, grazie, danke, merci,
agradeça-o</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Logan</DIV>
<DIV><BR></DIV></BLOCKQUOTE></FONT></BODY></HTML>
Re: Array resizing [message #27996 is a reply to message #27988] Wed, 14 November 2001 15:13 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Logan Lindquist wrote:

> What's the best way to take a byte array that is (1,256,256) and make
> it a byte array that is just (256, 256)? Looping would seem to take a
> while. I can't figure out at this moment of a way to store the x and y
> into temp variables and then recopy them into another byte array.
> Maybe there is something that will just get rid of the damn 1, without
> doing either.
>

Try the REFORM function.

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: Array resizing [message #27998 is a reply to message #27996] Wed, 14 November 2001 15:03 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Logan Lindquist (llindqusit@mrdoc.cc) writes:

> What's the best way to take a byte array that is
> (1,256,256) and make it a byte array that is just
> (256, 256)?

a = Bytarr(1, 256, 256)
b = Reform(a)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Please disregard last (idiotic) message
Next Topic: Re: rotated postscript fonts

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

Current Time: Wed Oct 08 16:02:13 PDT 2025

Total time taken to generate the page: 0.00367 seconds