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

2 次查看(过去 30 天)
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 ??

采纳的回答

KSSV
KSSV 2022-8-24
A(A(:,7)>1,7) = 1 ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by