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

Home » Public Forums » archive » Re: appending to column
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: appending to column [message #61461 is a reply to message #61371] Wed, 16 July 2008 10:20 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
>> IDL> print,a
>> 0 1
>> 2 3
>> 4 311
>> IDL> print,a[0,*] +
>> float(a[1,*])/10^strlen(strcompress(string(a[1,*]),/rem))
>> 0.100000
>> 2.30000
>> 4.31100
>
> Alright, these explanations don't exactly leap to mind for me.
> Which math class was I suppose to learn this in? :-(
>
> Cheers,
> David

division by 10, by 100 by 1000... hum.... too far back in time to
remember when we learn it! :)

1) get the number of digits for the decimal part
2) divide the decimals by 10 power to the number of digits( ->
10,100,1000 etc) so that 0 <= result < 1.0
3) add it to the integer part

Jean
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 330 Humingbird GPS 33020
Next Topic: Re: IDL Matrix Multiply and Dual-Core CPUs

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

Current Time: Wed Oct 08 17:50:10 PDT 2025

Total time taken to generate the page: 0.00461 seconds