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
- :
- Using Prime 3.0, the determinant function does not...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- 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
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

02-15-2017
07:38 AM

02-15-2017
07:38 AM

When I load a matrix up with al reals the |A| or det(A) works fine and returns the value. If I add a +1i or any imaginary number to an element, the |A| or det(A) returnb 0. This frustrating since I have programs that use this alot for filling arrays in a linear systems problem.

Solved! Go to Solution.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

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

02-16-2017
12:50 PM

02-16-2017
12:50 PM

Express Prime does work with complex numbers,

It understands that the middle element of B is a complex number. It can produce it's complex conjugate, but the Re() and Im() functions are considered 'Premium' function, although you can easily circumvent that by defining them using the complex conjugate.

Anyway, this is what Express Prime 3.1 produces (typed everything in myself):

Luc

51 REPLIES 51

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

02-15-2017
10:22 AM

02-15-2017
10:22 AM

Hmmmm!

From my 3.0:

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

02-16-2017
12:31 PM

02-16-2017
12:31 PM

I typed Fred's example into Prime 3.1: No Good

I typed Fred's example into MC15: Good

I converted MC15 to Prime 3.1: Good

I did copy/paste of converted elements into new Prime 3.1 worksheet: No Good!

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

02-17-2017
04:51 AM

02-17-2017
04:51 AM

After opening the document "**Determ_FK**.mcdx" in **Mathcad Prime 3.1 Express** and recalculation (button "**Calculate**") there are no errors:

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

02-16-2017
08:02 AM

02-16-2017
08:02 AM

Please provide a worksheet (and screenshot) of your issue.

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

02-16-2017
11:11 AM

02-16-2017
11:11 AM

We do not know which version of Prime Foster has. Maybe he uses Express Prime and there may exist the difference between full Prime and Express Prime. If I tried to calculate the determinant of Fred's matrix B in Express Prime the result was 0.

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

02-16-2017
11:47 AM

02-16-2017
11:47 AM

That's interesting

and depressing.

If Express can't do an operation it should report that it can't, not give a false answer.

Can express deal with imaginary numbers?

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

02-16-2017
11:56 AM

02-16-2017
11:56 AM

Express lacks symbolics. And the question is: Is presence of symbolics required for calculations with complex numbers?

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

02-16-2017
12:05 PM

02-16-2017
12:05 PM

You don't need symbolics. Mathcad is primarily numeric.

You should be able to open the attached file using Express.

It writes two imaginary variables and operates with them.

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

02-16-2017
12:50 PM

02-16-2017
12:50 PM

Express Prime does work with complex numbers,

It understands that the middle element of B is a complex number. It can produce it's complex conjugate, but the Re() and Im() functions are considered 'Premium' function, although you can easily circumvent that by defining them using the complex conjugate.

Anyway, this is what Express Prime 3.1 produces (typed everything in myself):

Luc

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

02-17-2017
04:32 AM

02-17-2017
04:32 AM

The following result was obtained in **Mathcad Prime Express 3.0 **(there is no bug). Please attach your worksheet for Prime 3.0.

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

02-16-2017
01:47 PM

02-16-2017
01:47 PM

I am using Prime 3.0. I asked a colleague at work to try it. She got the same result |A| = 0.

I ran Fred's example and it didn't work in Prime 3.0. It did work fine in MC 15, which I downloaded via a free 30-day trial.

It is a bit more odd. When I first opened my file in Prime 3.0 it gave the correct answer, (Maybe it justs displayed where I left off). Then I changed one value of variable (a material value) of a material property and it didn't work. When I close Prime 3.0 and then restart, the file doesn't run even the first time.

So why does it work on Fred's Prime 3.0, and it doesn't work on others?. Was there a patch or minor upgrade we're missing

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

02-16-2017
01:50 PM

02-16-2017
01:50 PM

Sorry I accidentally clicked "answered", "newbee". I still have the problem

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

02-16-2017
03:30 PM

02-16-2017
03:30 PM

No worries Foster - Welcome to PTC Community

Best,

Toby

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

02-16-2017
03:33 PM

02-16-2017
03:33 PM

So, Toby, can you (have some PTC expert) confirm that this is a bug...?

Luc

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

02-16-2017
03:55 PM

02-16-2017
03:55 PM

Thanks Luc - I will make an inquiry and follow-up.

Best,

Toby

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

02-17-2017
04:37 AM

02-17-2017
04:37 AM

Where is your worksheet with this bug, Luc?

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

02-17-2017
05:22 AM

02-17-2017
05:22 AM

here you go

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

02-17-2017
07:34 AM

02-17-2017
07:34 AM

I opened your file in **Prime Expres 3.1** version and click "**Calculate**", the result is without bugs. And what happens if you click on "**Calculate**"? How you include the value for "**1i**" in matrix element?

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

02-17-2017
07:54 AM

02-17-2017
07:54 AM

Now I tried to retype this example manually in the new worksheet in **Prime Express 3.0**, then save / resave / recalculate worksheet, but there are no bugs.

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

02-17-2017
08:22 AM

02-17-2017
08:22 AM

How come you have double bars "||A||" and "||B||" for the determinant?

Luc

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

02-17-2017
08:52 AM

02-17-2017
08:52 AM

This operator:

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

02-17-2017
09:12 AM

02-17-2017
09:12 AM

That should give the **norm** of a vector, which can be extended to the norm of a matrix ( Matrix norm - Wikipedia), but the **determinant** of a matrix is something different ( Determinant - Wikipedia).

Luc

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

02-19-2017
10:17 AM

02-19-2017
10:17 AM

This is what Mathcad 11, correctly, makes of it. I'd expect mathcad 15 to give the same results:

Luc

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

03-01-2017
08:44 AM

03-01-2017
08:44 AM

Yes, this is the "norm", for the calculation of "determinant" is used:

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

02-17-2017
08:14 AM

02-17-2017
08:14 AM

If I click on "Calculate" the sheet is recalculated with the same (buggy) results.

I tried playing with the calculation options. Switching on each option individually doesn't change any results, but when all are switched on:

The error messages with the two red areas are: "Unknown error: mpl%_exception".

Conclusion:

Bug!

Luc

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

02-17-2017
08:21 AM

02-17-2017
08:21 AM

And when I subsequently unchecked each of the calculation options. Prime just crashed.

Luc

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

02-17-2017
08:43 AM

02-17-2017
08:43 AM

Luc,

From what source did you get your Mathcad Prime Express version?

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

02-17-2017
09:14 AM

02-17-2017
09:14 AM

Downloaded it from PTC website.

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

02-16-2017
03:51 PM

02-16-2017
03:51 PM

Can you post your file? (Need to click "Use advanced editor" in upper right to get "Attach" on lower right.