change the value in a matrix
Show older comments
I have any matrix I need a code such that if the absolute value of a value in the matrix less than 3, then this value equal to zero.
for example if i have the matrix:
A=[-1,4,3;1,5,-7;3,-2,9]
the answer will be:
B=[0,4,0;0,5,-7;0,0,9]
Thank you
Accepted Answer
More Answers (1)
ateq alsaadi
on 27 Apr 2015
0 votes
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!