Filtering Values in Matlab in the Same Matrix Size

조회 수: 8 (최근 30일)
Fatih
Fatih 2023년 10월 26일
댓글: Fatih 2023년 10월 26일
I have a matrix 3x3.
I want to see numbers greater than 5.
so
A = [2 5 8; 2 6 7; 1 9 5]
the answer will be
Ans = [0 0 8; 0 6 7; 0 9 0]
Thanks şn advance for your help
  댓글 수: 3
Les Beckham
Les Beckham 2023년 10월 26일
Also, if you are just getting started with Matlab, I would highly recommend that you take a couple of hours to go through the free online tutorial: Matlab Onramp
Fatih
Fatih 2023년 10월 26일
thanks.

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2023년 10월 26일
A = [2 5 8; 2 6 7; 1 9 5] ;
A(A<=5) = 0
A = 3×3
0 0 8 0 6 7 0 9 0

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by