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

Home » Public Forums » archive » Re: a newbie question on code efficiency
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: a newbie question on code efficiency [message #26533 is a reply to message #26291] Sun, 09 September 2001 11:48 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:
>
> GB Smith (gogosgogos@usa.net) writes:
>
>> i feel soooo stupid :)
>> better go back to the books and study the old fashioned way :P
>
> Yeah, well, it happens to, uh, all of us occasionally.
> Although usually it has something to do with a
> Histogram function. :-(
>
> 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


Here is my solution,

cut_off=180
x=indgen(255)
v=make_array(/int,255 ,value=cut_off)
x[((x-v) >1 +cut_off)]=1
print,x

0 1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16 17
18 19 20 21 22 23 24 25 26
27 28 29 30 31 32 33 34 35
36 37 38 39 40 41 42 43 44
45 46 47 48 49 50 51 52 53
54 55 56 57 58 59 60 61 62
63 64 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89
90 91 92 93 94 95 96 97 98
99 100 101 102 103 104 105 106 107
108 109 110 111 112 113 114 115 116
117 118 119 120 121 122 123 124 125
126 127 128 129 130 131 132 133 134
135 136 137 138 139 140 141 142 143
144 145 146 147 148 149 150 151 152
153 154 155 156 157 158 159 160 161
162 163 164 165 166 167 168 169 170
171 172 173 174 175 176 177 178 179
180 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1


regards

Reimar

--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: object graphic / direct graphic
Next Topic: call_method

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

Current Time: Wed Oct 08 20:03:22 PDT 2025

Total time taken to generate the page: 0.02109 seconds