Skip to main content
1-Visitor
February 15, 2017
Solved

Using Prime 3.0, the determinant function does not handle a matrix with complex numbers. Don't how to fix it.

  • February 15, 2017
  • 51 replies
  • 28510 views

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. 

Best answer by LucMeekes

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

23-Emerald I
February 15, 2017

Hmmmm!

From my 3.0:

15-Moonstone
February 16, 2017

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!

24-Ruby IV
February 17, 2017

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

Pic_2.png

24-Ruby IV
February 16, 2017

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

1-Visitor
February 16, 2017

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.

23-Emerald I
February 16, 2017

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?

1-Visitor
February 16, 2017

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

fstulen1-VisitorAuthor
1-Visitor
February 16, 2017

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

fstulen1-VisitorAuthor
1-Visitor
February 16, 2017

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

Emeritus
February 16, 2017

No worries Foster - Welcome to PTC Community

Best,

Toby

24-Ruby IV
February 17, 2017

Foster, Fred, Luc,

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

23-Emerald I
February 17, 2017

I do not have Express, full up Prime 3.0:

24-Ruby IV
March 1, 2017

I use Prime 3.1 32-bit (F000 (2015.02.25.001/3.0.0.266)) with .NET Framework 4.6.1.

1-Visitor
February 17, 2017

Fresh install. downloaded from PTC website

screenshot1.PNG

amcgough
14-Alexandrite
February 23, 2017

Thank you for this information - we're currently looking into this issue.It would help our investigation to know what versions of Prime on what versions of .NET seem to be exhibiting the problem. For those of you who see this determinant issue, can you let us know the following:

  • The version of Prime you are running (Prime 3.0, Prime 3.1)
  • The bitness of the version of Prime you are running (32 bit, 64 bit)
  • The operating system you're running on
  • The bitness of your operating system
  • The version of .NET you are running - details on how to do that can be found here: https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx

Even though Prime 3.0 is certified to run on .NET 4.0 and Prime 3.1 certified on .NET 4.5.1 and .NET 4.5.2, if you are running those versions of Prime on unsupported versions of .NET that information will still be useful to know.

Many thanks,

Andy.

fstulen1-VisitorAuthor
1-Visitor
February 23, 2017

Hi Andy,

Sorry I had to forward your questions to one of our IT consultants that's been helping.  In either case nothing is fixed at this point.  I don;t know if you have a list of contacts here at Ethicon, but his name is Mike Craycraft.  I'll forward his responses.

It is Mathcad Prime 3.0 and I am pretty sure it's 64 bit. 

Thanks,

Foster

x3112

fstulen1-VisitorAuthor
1-Visitor
February 28, 2017

Dear All:

Thank you for all the support and suggestions.  After Andy's response we check the Net version and had to make the change.  That fixed it.  So I'm finally back up and running Prime 3.0 and can get back to my job.

Thanks again,

Foster

1-Visitor
February 24, 2017

Windows 10 64-bit (1607, 14393.693)

PTC Mathcad Express Prime 3.1 64-bit, F000 (2015.02.25.001/3.0.0.266)

.net 4.6.2 (DWORD version 394802)

amcgough
14-Alexandrite
March 1, 2017

All - thank you for the information you've provided in this thread, once again it's been extremely helpful for the Mathcad team. We've found and fixed the observed determinant issue in Prime 4.0, releasing on March 6th next week. Though you may find the issue resolved if you roll back your version of .NET to the version supported by the version of Prime you are running (.NET 4.0 for Prime 3.0, .NET 4.5.1 or 4.5.2 for Prime 3.1), the nature of the issue means that we can't guarantee another Microsoft update now or in the future won't reveal it again. The recommended way to resolve this is therefore to upgrade to Prime 4.0.

Many thanks,

Andy.

24-Ruby IV
March 2, 2017

Hi Andy,

And whether there was a beta testing of this 4th version of the program (is there will be an invitation for users for a beta of testing of future releases of Mathcad Prime too)? How the situation (and date of release) with an next service release of Mathcad 15 M050 is?

1-Visitor
March 3, 2017

Solution of this "problem" is quite simple. You should perform calculations of determinant symbolically. This is strange because you can multiple or invert matrices with complex elements numerically. This not the first and not the last strange behaviour of Prime.

Robert