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

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Division between two vectors. Prime 7 error but M15 ok

DM_10127316
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


@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

 

 

View solution in original post

5 REPLIES 5

Please upload your worksheets.


@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

 

 

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.

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.


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

 

2021 11 30 a.png

 

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.

 

2021 11 30 b.png

 

Stuart

Top Tags