Sparweb
Aerospace
- May 21, 2003
- 5,156
I'm looking for a simple array operator (or combination of operators) that will do the same thing that I currently only can do by explicitly computing the value for every element.
Somehow, I can't find an array operator that will select the values in two arrays, subtract them, and then store them in a resulting array.
To picture what I'm doing, think of a box with several compartments. The air pressure in each compartment is different. The difference in air pressure on each of the walls determines the force on each wall.
Sounds like a simple problem, but I can't find the operator that will solve this when I store the pressures in an array.
An example of what I am trying to do is attached below.
I also included in my attachment a "forced" answer where I manually calculate the answer and show the correct result. It shouldn't be that hard.
STF
Somehow, I can't find an array operator that will select the values in two arrays, subtract them, and then store them in a resulting array.
To picture what I'm doing, think of a box with several compartments. The air pressure in each compartment is different. The difference in air pressure on each of the walls determines the force on each wall.
Sounds like a simple problem, but I can't find the operator that will solve this when I store the pressures in an array.
An example of what I am trying to do is attached below.
I also included in my attachment a "forced" answer where I manually calculate the answer and show the correct result. It shouldn't be that hard.
STF