採用された回答

Torsten
Torsten 2022 年 4 月 25 日
編集済み: Torsten 2022 年 4 月 25 日

1 投票

[m,n] = size(A);
Sc = sum(A,1);
Sr = sum(A,2);
if (Sc == ones(1,n)) & (Sr == ones(m,1))
disp('Correct')
else
disp('Incorrect')
end

2 件のコメント

Md. Mohidul Islam
Md. Mohidul Islam 2022 年 4 月 25 日
It's running on mobile apps but showing the mistake in the computer
Torsten
Torsten 2022 年 4 月 25 日
The corrected code above works for me.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2022 年 4 月 25 日

コメント済み:

2022 年 4 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by