×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Simplify an Array Operation

Simplify an Array Operation

Simplify an Array Operation

(OP)
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

RE: Simplify an Array Operation

(OP)
Y'know, a little voice was saying it was going to be obvious when I saw the answer.

Consider my forehead to be firmly slapped!

STF

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close