필터 지우기
필터 지우기

Comparision of a matrix to a value

조회 수: 2 (최근 30일)
Tina
Tina 2019년 10월 31일
댓글: Tina 2019년 10월 31일
I want to compare values of a matrix of 4 by 3 dimension
for example
a=[7 8 8 ;5 3 2 ;1 2 3;7 6 5]
to a 1by1 matrix
b=[ 5]
if the values are greater than 5 the codes give me a 1 and 0 if not in a matrix of same dimension as a.What should i do??

채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 10월 31일
편집: KALYAN ACHARJYA 2019년 10월 31일
a=[7 8 8 ;5 3 2 ;1 2 3;7 6 5];
b=5;
result=a>b

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by