필터 지우기
필터 지우기

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