Skip to main content
1-Visitor
November 20, 2016
Solved

Strange lines on top of the functions while using nested arrays

  • November 20, 2016
  • 10 replies
  • 5398 views

Hello,

I have encountered a very strange problem in Mathcad 15. While using nested arrays to express two functions, the results appeared with having a line on top of the functions. This line does not seem to be mentioned anywhere in the manual and is interfering with calculations of derivatives.

There is of course a workaround by using the substitute function - transforming the functions with the line on top to ones without the line. The problem is, my calculations in general will contain huge amount of sub-functions and their mixed partial derivatives, so fixing the problem manually is very burdensome and inelegant.

Has anyone encountered this problem and found a solution?

Kind regards


Rafal

Best answer by Werner_E

The problem must be caused by the fact that I am multiplying functions instead of variables

Either this or is has to do with the fact that the elements are matrices themselves. I am not sure.

But an easy solution could be to transpose the first vector and that way use normal matrix multiplication instead of vector dot product:

Regards

Werner

10 replies

23-Emerald I
November 21, 2016

You've hit the quote key instead of the colon.  The result  produces the overbar

1-Visitor
November 21, 2016

Hello Fred,

Thank you for your reply. I did not know about the complex conjugate operator, however I have not used the quote key - all my definitions were established using the colon. The problem is, Mathcad is showing the results of multiplication of two nested arrays with the overbar, with me not having used the overbar in any previous definitions. Still, I found it is possible to obtain the results without the overbar in the "U.total" function if the overbar [ " ] is applied to "U.0", "U.1" and "U.2" functions.

Best regards


Rafal 

23-Emerald I
November 21, 2016

When I open your file, it's "broken":

And the green derivative is:

(Note that there are complex conjugate overbars in this expression.  The next lines  I see are:

Which is why I assumed that you were typing the left hand side.  If you copied that left hand side from the green derivative, then I suggest might work.

25-Diamond I
November 21, 2016

Mathcad correctly conforms to the mathematical definition of the dot product

-> Dot product - Wikipedia

and unless told otherwise it defaults to complex numbers

And - no, you can't use the conjugate operator on the LHS of an assignment.

Regards

Werner

1-Visitor
November 21, 2016

Hello Werner,

You are right. Mathcad is doing everything accordingly to mathematical definition of the dot product.

Taking the real part is the solution that is seek. I have checked the "assume, ALL = real" on my problem and unfortunately it does not work. The problem must be caused by the fact that I am multiplying functions instead of variables (I have z*u(fi,x) instead of a1*b1 which works).

I have attached a snapshot showing all possible combinations with "assume, , = real" which do not work.

Best regards


Rafal

Werner_E25-Diamond IAnswer
25-Diamond I
November 21, 2016

The problem must be caused by the fact that I am multiplying functions instead of variables

Either this or is has to do with the fact that the elements are matrices themselves. I am not sure.

But an easy solution could be to transpose the first vector and that way use normal matrix multiplication instead of vector dot product:

Regards

Werner