Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I have a question >> What it is the difference when mathcad write the unit of a resulte inside the brackets [result*Unit] and outside [result]* unit?
is there any difference ? and how to make all units showed the same way?
Thanks in advance
Yusra
Solved! Go to Solution.
If all elements of a vector/matrix are of the same dimension, then Prime uses to place the unit (for all elements) after the matrix and you are also allowed to change this unit to something you like more.
If the matrix contains quantities of different dimensions, Prime places the units right to the values inside the matrix and unfortunately does not allow to change this unit directly. You can write a different unit after the matrix and Prime will change the units inside the matrix accordingly - sometimes with unexpected effects.
In case of nested matrices Prime seems to show units only if all the dimensions in a 'subvector' are the same. Manually editing the unit at the end of the matrix without expanding nested matrices has a strange effect which maybe also could be called a bug...?
If all elements of a vector/matrix are of the same dimension, then Prime uses to place the unit (for all elements) after the matrix and you are also allowed to change this unit to something you like more.
If the matrix contains quantities of different dimensions, Prime places the units right to the values inside the matrix and unfortunately does not allow to change this unit directly. You can write a different unit after the matrix and Prime will change the units inside the matrix accordingly - sometimes with unexpected effects.
In case of nested matrices Prime seems to show units only if all the dimensions in a 'subvector' are the same. Manually editing the unit at the end of the matrix without expanding nested matrices has a strange effect which maybe also could be called a bug...?
Yes, that's why I wrote "without expanding" 😉
does that affect the results, or just the units?
@YA_10963798 wrote:
does that affect the results, or just the units?
In itself, it is only a representation problem of (nested) matrices. But of course the numbers in the matrix are adjusted accordingly if you change the unit at the back.
You also need to be careful if you have NaNs in your results. A NaN will attract the units of the first element with units in a matrix.
I noticed it in this thread: https://community.ptc.com/t5/Mathcad/Vectorizing-SIUnitsOf-over-array-containing-NaN/m-p/981787/highlight/true#M214833
There is a bug report in the system that will hopefully deal with this issue in a (not too distant) future version.
I also found that it was commented on in this thread back in January 2023: https://community.ptc.com/t5/Mathcad/Having-fun-with-NaNs-and-mixed-units-in-matrices/m-p/852699/highlight/true#M204913. I was unaware of this thread until I searched for my thread; I also found the '0' problem and that behaviour should also be addressed as part of the same bug report.
Stuart