Clear Filters
Clear Filters

How to fixed matrix dimensions

4 views (last 30 days)
Md. Mohidul Islam
Md. Mohidul Islam on 25 Apr 2022
Commented: Torsten on 25 Apr 2022
Please Fix this error.

Accepted Answer

Torsten
Torsten on 25 Apr 2022
Edited: Torsten on 25 Apr 2022
[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 Comments
Md. Mohidul Islam
Md. Mohidul Islam on 25 Apr 2022
It's running on mobile apps but showing the mistake in the computer
Torsten
Torsten on 25 Apr 2022
The corrected code above works for me.

Sign in to comment.

More Answers (0)

Categories

Find more on Modeling in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!