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
- :
- Re: 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

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

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

08-20-2019
05:49 AM

08-20-2019
05:49 AM

Reply to your PM

@Kishore1 wrote:

Hi Werner,

The file (WE_20190819_Forum.mcdx) which you have attached is not able to open with the current version of Mathcad Prime 4.0 64-bit which am using in my PC.

I have attached my worksheet in same thread where i asked the previous question.

Thanks & Regards,

Kishore

You did not state which version of Prime you use and the files I attached were created with the current Prime 5.

Unfortunately Prime is built that silly so that you can't tell with which version a worksheet was created and older versions can't read a sheet created by a newer one. The most bad is that Prime can't save its sheets in older formats, so the only ways to "convert" a sheet from Prime 5 to Prime 4 are to either retype the whole or to have both versions installed, open both and copy every region one by one to the P4 sheet.

I did the last and attach the P4 worksheet here.

11 REPLIES 11

- 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.

Highlighted
##

- 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