MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

List handling

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15136] List handling
  • From: Jorge Zickermann <jzickermann at mail.EUnet.pt>
  • Date: Wed, 16 Dec 1998 03:11:13 -0500
  • Organization: Personal
  • Sender: owner-wri-mathgroup at wolfram.com

Dear Sirs,

	The following program applies a function to all the possible
combinations of 4 parameters (L,B,T,Cb). By selecting the results of
that function, I want to know the combinations of the 4 parameters that
pass a selection and the corresponding results to be selected.
	

L = 182;

B = 28.4 ;

T = 11 ;

Cb = 0.86;

resultrange = 0.01;

precision = 0.01;

BlockVolume[L_,B_,T_]:= L*B*T

CorrectedVolume[X_]:= Cb*X

HullVolume[L_,B_,T_,Cb_]:= CorrectedVolume[BlockVolume[L,B,T]]

data = Table[{L,B,T,Cb,HullVolume[L,B,T,Cb]},{L,L*(1-resultrange),
     
L*(1+resultrange),precision*L},{B,B*(1-resultrange),B*(1+resultrange),
     
precision*B},{T,T*(1-resultrange),T*(1+resultrange),precision*T},{Cb,
      Cb*(1-resultrange),Cb*(1+resultrange),precision*Cb}];

Dimensions[data]

{3,3,3,3,5}

qualify = Select[Flatten[data,3],48880<Last[#]<48900&]

{{180.18,28.116,11.11,0.8686,48887.1},{180.18,28.4,11.,0.8686,48892.},{180.18,
   
28.4,11.11,0.86,48892.},{180.18,28.684,10.89,0.8686,48887.1},{180.18,
   
28.684,11.,0.86,48892.},{180.18,28.684,11.11,0.8514,48887.1},{182.,28.116,
    11.,0.8686,48892.},{182.,28.116,11.11,0.86,48892.},{182.,28.4,10.89,
    0.8686,48892.},{182.,28.4,11.,0.86,48896.8},{182.,28.4,11.11,0.8514,
   
48892.},{182.,28.684,10.89,0.86,48892.},{182.,28.684,11.,0.8514,48892.},{
   
183.82,28.116,10.89,0.8686,48887.1},{183.82,28.116,11.,0.86,48892.},{
   
183.82,28.116,11.11,0.8514,48887.1},{183.82,28.4,10.89,0.86,48892.},{
    183.82,28.4,11.,0.8514,48892.},{183.82,28.684,10.89,0.8514,48887.1}}

	Having selected those combinations, I want to apply another function
only to these combinations because the others are not solutions to my
problem.  
	Here I have the list of lists that contains the 4 parameters that give,
for each case, an accepted result (the 5th element). 
	Now I want to add to each list a new result, function of some elements
in that list, and apply this function simultaneously to all the
approved combinations.
	Having done that, a new selection is to be made and a new function to
be applied, etc.
	Eventually I want to end with a list of lists of the combinations of
parameters, and successive results, that passed a series of tests.
	How can I get round to doing that?

	Thankyou in advance for your help.

	Jorge



  • Prev by Date: Re: Reversing the axis of a plot
  • Next by Date: NIntegrate of a Decaying Exponential
  • Previous by thread: Bug with ComplexExpand on PolyGamma?
  • Next by thread: List handling