How to fixed matrix dimensions

2 ビュー (過去 30 日間)
Md. Mohidul Islam
Md. Mohidul Islam 2022 年 4 月 25 日
コメント済み: Torsten 2022 年 4 月 25 日
Please Fix this error.

採用された回答

Torsten
Torsten 2022 年 4 月 25 日
編集済み: Torsten 2022 年 4 月 25 日
[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 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by