cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

7-Bedrock

## Division between two vectors. Prime 7 error but M15 ok

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,

1 ACCEPTED SOLUTION

Accepted Solutions
23-Emerald II
(To:DM_10127316)

@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.

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

5 REPLIES 5
24-Ruby II
(To:DM_10127316)

23-Emerald II
(To:DM_10127316)

@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.

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

7-Bedrock
(To:StuartBruff)

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-Newbie
(To:DM_10127316)

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.

23-Emerald II
(To:LJ_10088389)

@LJ_10088389 wrote:

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.

It depends on what you mean by a "vector".  The term is officially abused in Mathcad.

Yes, we can debate whether such things form mathematical vectors under some definition, but they are best thought of as data structures that can be used to represent an "engineer's" idea of a vector.   It is certainly permissible to divide "vectors" in Mathcad and some other array languages.

Stuart

Announcements
Top Tags