Skip to main content
12-Amethyst
November 24, 2021
Solved

Division between two vectors. Prime 7 error but M15 ok

  • November 24, 2021
  • 2 replies
  • 2934 views

Hi everyone,

I am converting Mathcad 15 files to Prime and I encounter an issue that I can't debug. Its about a division between two vectors where the divisor has zeros in it. Prime shows the following error: This expression is divided by zero. It cannot be computed. While Mathcad 15 has no problem with this division.

 

I attached an image to illustrate the problem.

 

Regards,

 

Best answer by StuartBruff

@DM_10127316 wrote:

Hi everyone,

I am converting Mathcad 15 files to Prime and I encounter an issue that I can't debug. Its about a division between two vectors where the divisor has zeros in it. Prime shows the following error: This expression is divided by zero. It cannot be computed. While Mathcad 15 has no problem with this division.


It's been a long time since I've used Mathcad 15, but IIRC, there's an option somewhere in the settings to set 0/0 to 0.  Mathcad Prime doesn't, AFAIA, have such an option.   You'll probably have to define a function to automatically handle this case.

 

2021 11 25 A.png

 

I've only got the non-trial Mathcad Express 7, which doesn't allow programming.  Hence my double-expression definition of the divide function.  The first line handles the 0/0 condition, and the second line calls it using the vectorized operator to make it behave like the / operator (you can't apply the vectorized operator to an if 'function').

 

Stuart

 

 

2 replies

24-Ruby III
November 25, 2021

Please upload your worksheets.

23-Emerald V
November 25, 2021

@DM_10127316 wrote:

Hi everyone,

I am converting Mathcad 15 files to Prime and I encounter an issue that I can't debug. Its about a division between two vectors where the divisor has zeros in it. Prime shows the following error: This expression is divided by zero. It cannot be computed. While Mathcad 15 has no problem with this division.


It's been a long time since I've used Mathcad 15, but IIRC, there's an option somewhere in the settings to set 0/0 to 0.  Mathcad Prime doesn't, AFAIA, have such an option.   You'll probably have to define a function to automatically handle this case.

 

2021 11 25 A.png

 

I've only got the non-trial Mathcad Express 7, which doesn't allow programming.  Hence my double-expression definition of the divide function.  The first line handles the 0/0 condition, and the second line calls it using the vectorized operator to make it behave like the / operator (you can't apply the vectorized operator to an if 'function').

 

Stuart

 

 

12-Amethyst
November 25, 2021

That was it! I didn't know that Mathcad 15 could consider 0/0 as 0. I applied a try/error function and it worked.

1-Visitor
November 29, 2021

We cannot divide two vectors.can have a Cross product, which multiplies two vectors and produces another vector. Other vector spaces can have other sorts of multiplication like the Exterior product and other wacky things.