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

Home » Public Forums » archive » Re: Multiply N bands to N numbers
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Multiply N bands to N numbers [message #54393] Tue, 12 June 2007 09:33
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ali.darvishi@gmail.com writes:

> am always using ENVI and new with IDL.
> I have a problem with hyperspectral data multiplication..
> I want to multiply 200 bands to an ASCII file that contain 200
> separate number, each for any band.
> Does anybody know a function in IDL that can Multiply N bands to N
> numbers at once?.

You might try using the techniques of the Dimensional Juggling
Tutorial:

http://www.dfanning.com/tips/rebin_magic.html

IDL> a = IntArr(2, 4, 2)
IDL> b = [2,4]
IDL> Print, a
0 1 2
3 4 5
6 7 8
9 10 11

12 13 14
15 16 17
18 19 20
21 22 23
IDL> Print, a * Rebin(Reform(b, 1, 1, 2), 3, 4, 2)
0 2 4
6 8 10
12 14 16
18 20 22

48 52 56
60 64 68
72 76 80
84 88 92

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Multiply N bands to N numbers
Next Topic: large widget_trees

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

Current Time: Fri Oct 10 01:20:11 PDT 2025

Total time taken to generate the page: 1.44272 seconds