how to set values in the particular column to constnat value based on greater than equal to criteria

2 views (last 30 days)
Hi,
For Instance, lets say I have a matrix A of size 5000 x 7, I would like to set all the values greater than 1 in the column 7 i.e.( A (:,7) ) to be 1, may I know how to implement this ??

Accepted Answer

KSSV
KSSV on 24 Aug 2022
A(A(:,7)>1,7) = 1 ;

More Answers (0)

Categories

Find more on Multidimensional Arrays 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!