Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
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,
Solved! Go to Solution.
@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
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.
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.
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