Azzera filtri
Azzera filtri

How to fixed matrix dimensions

1 visualizzazione (ultimi 30 giorni)
Md. Mohidul Islam
Md. Mohidul Islam il 25 Apr 2022
Commentato: Torsten il 25 Apr 2022
Please Fix this error.

Risposta accettata

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

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Modeling in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by