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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Rounding values in a matrix

MattLiberty
1-Newbie

Rounding values in a matrix

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.

1 ACCEPTED SOLUTION

Accepted Solutions

What you're looking for is "vectorize"

View solution in original post

4 REPLIES 4

What you're looking for is "vectorize"

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

MikeArmstrong
5-Regular Member
(To:nas0k)

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.

Clipboard01.jpg

MikeArmstrong
5-Regular Member
(To:MattLiberty)

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.

Top Tags