Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- comparison of two matrix

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
01:27 AM

08-14-2019
01:27 AM

comparison of two matrix

Hi,

can i please know the method for this condition.

1st row value of ADC matrix should compare with ADC_LUT matrix and take the next higher and lower value.

for eg-if 3996 from ADC matrix is compared with ADC_LUT matrix , it should take out 3997 & 3968 value from ADC_LUT matrix.

similarly for other value to.

Regards,

Kishore

Labels:

9 REPLIES 9

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
04:58 AM

08-14-2019
04:58 AM

Re: comparison of two matrix

Please attach the worksheet. Your picture got lost.

Luc

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
05:00 AM

08-14-2019
05:00 AM

Re: comparison of two matrix

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
05:03 AM

08-14-2019
05:03 AM

Re: comparison of two matrix

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
05:45 AM

08-14-2019
05:45 AM

Re: comparison of two matrix

See attachment.

Success!

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-14-2019
06:44 AM

08-14-2019
06:44 AM

Re: comparison of two matrix

Thank you Luc.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
07:23 AM

08-19-2019
07:23 AM

Re: comparison of two matrix

Am doing the interpolation here to find out the temperatures (4x0 matrix) for corresponding values in ADC matrix ,can i please know the method for this condition.

1st row value of ADC matrix should compare with ADC_LUT matrix and take the next higher and lower value from that ADC_LUT matrix and corresponding temperature values from temp matrix and find the desired temperature for eg-if 3996 from ADC matrix is compared with ADC_LUT matrix , it should take out 3997(g1) & 3968(g3) value from ADC_LUT matrix and corresponding temperature i,e -40(t1) & -35(t3) from Temp matrix and interpolate the temperature t2 using the above attached formula for value 3996(g2).

similarly for other values of ADC matrix (4x0) automatically it should compare.

Regards,

Kishore

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
08:16 AM

08-19-2019
08:16 AM

Re: comparison of two matrix

Attach a mathcad/Prime WORKSHEET, not just a picture...

Luc

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
08:37 AM

08-19-2019
08:37 AM

Re: comparison of two matrix

In case g2=3831 the calculation of g3 must fail because there is no smaller value in ADC_LUT.

We can deal with that case with a try and catch and return NaN for this value:

P5 worksheet attached.

P.S.: If you meant g3<=g2 instead of g3<g2 as you wrote, then you have to replace "lt" by "leq" and can do without the extra function.

Oops, stop! bad idea. You may end up with g1=g3 and this would result in a division by zero. So you should come up with another idea to deal with that case.

Wouldn't it be natural to just use the temperature from temp as it is if the value is exactly in ADC_LUT ?

P.P.S.: For the future - please attach your worksheets, not just pictures!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

08-19-2019
08:55 AM

Top Tags