Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
I am stuck on something very simple and hopefully there is an easy answer. I need to round all of the values in a matrix to the nearest integer. I have provided a quick worksheet to work with as an example. I have scaned through all of the functions for vectors and matricies and do not see anything helpful. I am using mathcad prime 3.0.
Solved! Go to Solution.
My Prime tales a long time to open but have you tried using "Math Formatting" tab and change the default (3) decimal places to 0?
Make certain that the matrix is active (select it) before you apply the format.
I hope this helps.
Norm
That would work if he assigned A to another variable, but he cannot reduce the number of decimals places if A is evaluated as he has defined the matrix above.
As Fred pointed out you need to explicitly vectorize the A, as it is a matrix.
round works in this case as you have not specified the number of digits to round to.