Filter löschen
Filter löschen

How to fixed matrix dimensions

1 Ansicht (letzte 30 Tage)
Md. Mohidul Islam
Md. Mohidul Islam am 25 Apr. 2022
Kommentiert: Torsten am 25 Apr. 2022
Please Fix this error.

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by