cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Comparing sets of paired-vectors

AshehadAl
1-Newbie

Comparing sets of paired-vectors

Hi All,

I have 9 sets of two dimensional vectors and am interested in comparing these sets under certain conditions. The condtions are stated in the mathcad file attached. As there are 9 rules to be followed, I am confused as how to program it. I guess for and other types of loops may be required.

Any help would be highly appreciated.

Thanks,

Ashehad

1 ACCEPTED SOLUTION

Accepted Solutions
StuartBruff
23-Emerald II
(To:AshehadAl)

AshehadAl wrote:

Thanks Stuart for the response,

I have followed it to degree. As I did not fully understand, I am attaching two versions of the same program that you wrote with some more explanations. However, I am focusing for simplicity reasons on 3 vectors.

Thanks,

Ashehad

Hi Ashehad,

Unfortunately, I can't open the 'mcd' version even in M15, so I don't know what your questions were.

If you want to calculate each combination of vector, say a and b, then you can simplify matters considerably (I think!). If condA(a,b) is true, then condB(b,a) will be true and vice versa. Consequently, the total meeting A and B will be the same. In which case, you need simply count those meeting Condition C and split the difference between this number and the total number of possible combinations to get the number meeting A and B.

Stuart

Note: there was at least one error in condA - a '>' should have been a '<'.

View solution in original post

5 REPLIES 5
StuartBruff
23-Emerald II
(To:AshehadAl)

AshehadAl wrote:

Hi All,

I have 9 sets of two dimensional vectors and am interested in comparing these sets under certain conditions. The condtions are stated in the mathcad file attached. As there are 9 rules to be followed, I am confused as how to program it. I guess for and other types of loops may be required.

Any help would be highly appreciated.

Thanks,

Ashehad

Ashehad,

I had a brief look at your worksheet during the final moments shouting at the children to get ready for school but didn't have time to do more than that.

Unfortunately, I don't have whatever version of Mathcad you're using at work, so I had to remember (guess!!!) what you were after and invent some data.

Even more regrettably, I have had to throw together the attached worksheet in between slurping tea and doing actual work - there's more general form for your conditional functions that I may attempt to debug later - condition C (IIRC) seems to be redundant.

Stuart

Thanks Stuart for the response,

I have followed it to degree. As I did not fully understand, I am attaching two versions of the same program that you wrote with some more explanations. However, I am focusing for simplicity reasons on 3 vectors.

Thanks,

Ashehad

StuartBruff
23-Emerald II
(To:AshehadAl)

AshehadAl wrote:

Thanks Stuart for the response,

I have followed it to degree. As I did not fully understand, I am attaching two versions of the same program that you wrote with some more explanations. However, I am focusing for simplicity reasons on 3 vectors.

Thanks,

Ashehad

Hi Ashehad,

Unfortunately, I can't open the 'mcd' version even in M15, so I don't know what your questions were.

If you want to calculate each combination of vector, say a and b, then you can simplify matters considerably (I think!). If condA(a,b) is true, then condB(b,a) will be true and vice versa. Consequently, the total meeting A and B will be the same. In which case, you need simply count those meeting Condition C and split the difference between this number and the total number of possible combinations to get the number meeting A and B.

Stuart

Note: there was at least one error in condA - a '>' should have been a '<'.

Thanks once again Stuart,

You've answered my question and I have managed to understand and work out things properly.

Cheers,

Ashehad

StuartBruff
23-Emerald II
(To:AshehadAl)

No worries, Ashehad

Stuart

Top Tags