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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Need help with writing a program

arnair81
10-Marble

Need help with writing a program

Hi,

       I need help with a certain problem. So I have done calibration on a set of instruments. The serial numbers as well as the calibration factors associated with them are given in the first 2 columns of the excel sheet. Now I am running all the instruments (I don't have cal factors for some) and I am getting a certain calibrator count as shown in columns F and G.

 

Now the issue is I need to compare the serial numbers of all the instruments with the subset to see which ones have cal factors associated with them. For instruments with cal factors, I need to multiply the cal factor (associated with that serial number) with the count for that particular instrument and output the result. So I need to write a mathcad program to output only the serial numbers of instruments with cal factors as well as the product of cal factor and count. I am attaching the excel sheet. I am using Mathcad Prime 6. Thanks for the help.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi

Enclosed is the coding and the result.

Capture.JPG

 

Capture2.JPG

 

Cheers

Terry

 

View solution in original post

7 REPLIES 7

Hi

Enclosed is the coding and the result.

Capture.JPG

 

Capture2.JPG

 

Cheers

Terry

 

Thanks a lot!!!

Hi, I have a follow up question. If I want to take the median of the values in one column but if I want to avoid the rows with the NaN values in the overall calculation, what should I do? Thank you.

LucMeekes
23-Emerald III
(To:arnair81)

Check the filterNaN() function.

 

Success!
Luc

Thanks Luc,

                         I also need to write a program to remove outliers in the data. Can you tell me a way to remove rows containing data greater than or less than a certain fixed values. 

 

Thanks.

Hi,

 

You can put "if" statements within the inner loop to compare data[index[m to certain values 

Capture2.JPG

Thanks Terry!!! 

Top Tags