Comparision of a matrix to a value

1 回表示 (過去 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
  1 件のコメント
Tina
Tina 2019 年 10 月 31 日
THANK YOU.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by