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

Home » Public Forums » archive » reform a transposed array
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: reform a transposed array [message #94085 is a reply to message #94084] Mon, 16 January 2017 17:52 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, January 16, 2017 at 5:13:11 PM UTC-5, Cheryl wrote:
> I am having difficulties reforming a transposed array:
> e is int =array[3,1,2]
> I transposed e to : int = array[2,1,3]
>
> but now I want to reform e to [4,2]:
> e = reform(e,4,2,/overwrite)
>
> I know that this function won't work for reforming the array to [4,2] due to the difference in the number of elements.
>
> Is there a way to reform the array e to [4,2]?

The original array has 6 elements. The desired array has 8 elements. There's no way to use REFORM or REBIN to go to a different number of elements like this. You would be better off computing the elements of your desired array explicitly, one by one.
CM
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: MPMINSTEP in mpfit?
Next Topic: Amoeba and Tied Parameters

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

Current Time: Wed Oct 08 17:31:20 PDT 2025

Total time taken to generate the page: 0.00448 seconds