How to fixed matrix dimensions

4 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by