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

Home » Public Forums » archive » Re: extracting subarray (*,*,index) gives (1,1,index). WHY ???
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: extracting subarray (*,*,index) gives (1,1,index). WHY ??? [message #6881 is a reply to message #6870] Wed, 21 August 1996 00:00 Go to previous messageGo to previous message
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Uwe Knorr (knorr@neurologie.uni-duesseldorf.de) wrote:
: Dear reader,

: i want to extract a line from a 3D image by doing
: line = image(*,*,z)
: i expect line to be a 1d vector with dimension dim(z)
: or to be more IDLish, i expect the following to hold
: size(line) == (z)
: but instead I get
: size(line) == (1,1,z)
: I hope you know what I mean.

Bit confusing here, line=image(*,*,z) will give you a (nx,ny,1) result.
You probably meant you do line=image(x,y,*), which gives a (1,1,nz)
result. If you want a (nz) result, do line=reform(image(x,y,*)).
Reform, used like this, strips collapses leading dimensions of length 1.

Peter
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help on CGM Device
Next Topic: I had to try it!

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

Current Time: Sun Oct 12 02:19:42 PDT 2025

Total time taken to generate the page: 1.27965 seconds