Turn on suggestions

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

Showing results for

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

Showing results for

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

Nov 28, 2013
04:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
04:13 AM

Function of vector gives different (wrong) result, compared with range variable (Prime 2.0)

Hello,

I've got a severe issue with Mathcad Prime 2.0, and I'm not sure if it is my fault, or a bug in the program. Attached, you can find the example worksheet. I've cut it out from a more complex sheet and simplified it as much as possible (all units left out etc.).

In the upper area, a function k(T,M) is defined. I now want to cut out one-dimensional slices of this 2-dimensional function: k_hi(T) and k_lo(T), where M is not constant, but depends on the given constant parameter P and T.

I define both a range variable Temp=200, 220 ... 300 and a vector Temp' with the same values.

Now I output both k_hi(Temp), using the range variable, and the vector k'_hi = k_hi(Temp'). (same for lo instead of hi).

As you can see, the results for the vector are different from the range variable result!

They are in the same order of magnitude, though, so it could be a numerical precision issue. (Is there any possibility to play around with internal floating point precision in Mathcad Prime 2.0?) But this does not seem to make any sense.

By the way: "manual" calculation with my calculator favors the results from the range variable method.

Does anybody know what's going on here?

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

Nov 28, 2013
04:46 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
04:46 AM

You need to vectorise the 'vector' calculations to get the element by element result - see attached.

Alan

4 REPLIES 4

Nov 28, 2013
04:46 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
04:46 AM

You need to vectorise the 'vector' calculations to get the element by element result - see attached.

Alan

Nov 28, 2013
05:00 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
05:00 AM

Helle Alan,

thanks for the very quick help. So I understand now, what I was doing wrong, but I still do not understand what the program does if I *don't* vectorize k'_hi and k'_lo. Because the resulting output is also a vector, and the results are somewhat close to the true results.

Mark

Nov 28, 2013
06:03 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
06:03 AM

The difference thaat you have between the 2 variants is:

Adding the vectorise operator as the last equation gives the 'correct' result.

Multiplying 2 vectors gives a number of options:

1 & 2 show normal vector operations

3 prime is assuming that it should create a scalar.

4 prime gives an error

3a & 4a the vectorise operator gives a correction

Regards

Andy

Nov 28, 2013
07:09 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 28, 2013
07:09 AM

Okay, thanks. I think I understand the problem now.