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

Home » Public Forums » archive » Re: How to extract a scalar from a vector?
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: How to extract a scalar from a vector? [message #94779 is a reply to message #74162] Wed, 11 October 2017 03:10 Go to previous messageGo to previous message
chrisbuc is currently offline  chrisbuc
Messages: 1
Registered: October 2017
Junior Member
On Tuesday, 4 January 2011 23:37:35 UTC, David Fanning wrote:
> Balt writes:
>
>> See this:
>> IDL> help,cal_data[sel_cal_data,3]
>> <Expression> DOUBLE = Array[1]
>>
>> How on earth can I make cal_data[sel_cal_data,3] into
>> a scalar?
>
> IDL> Help, (cat_data[sel_cal_data,3])[0]
>
> Cheers,
>
> David
>
>
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

Thanks Dave,
I would never have thought of (arr[0])[0] to get a scaler from a 1 element array. Cheers :-)
Chris Buckley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Colorimetric map in IDL
Next Topic: Using color tables in function graphics

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

Current Time: Sun Oct 12 10:43:14 PDT 2025

Total time taken to generate the page: 1.12249 seconds