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

Home » Public Forums » archive » Re: Need help with an Iterative solution in IDL (relative newb question)
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: Need help with an Iterative solution in IDL (relative newb question) [message #61925] Thu, 14 August 2008 12:12
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
mbweller@gmail.com wrote:
> Hi All,
>
> I have up to 5 variables that that I need to vary in order to reach a
> solution range (e.g. solution +- 10%) and the variables themselves
> need to be bounded as not all values are physical possible. I then
> need all the possible combinations that report the correct solution
> range to be saved to an ASCII file, or some other output.
>
> Any assistance would be greatly appreciated.
>
> Thanks in advance,
> ~MAtt

If you are working with integer (if not, think of the index of your
float/text/object in an array), I have a set of function that might
interest you... it will return all possible combination between the
values of different variables.

ex: var1= 1 or 2 or 3
var2 = 4 or 5
var3 = 6

will return
1,4,6
1,5,6
2,4,6
2,5,6
3,4,6
3,5,6

now, if you have many possible value, it might be easier to vary the
value "on the fly"...

for var1=0,10 do begin
for var2=12.2,12.4,0.01 do begin
etc
Jean
[Message index]
 
Read Message
Previous Topic: Need help with an Iterative solution in IDL (relative newb question)
Next Topic: comp.lang.idl-pvwave corn

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

Current Time: Sat Oct 11 05:36:17 PDT 2025

Total time taken to generate the page: 0.40424 seconds