How to fixed matrix dimensions

8 vues (au cours des 30 derniers jours)
Md. Mohidul Islam
Md. Mohidul Islam le 25 Avr 2022
Commenté : Torsten le 25 Avr 2022
Please Fix this error.

Réponse acceptée

Torsten
Torsten le 25 Avr 2022
Modifié(e) : Torsten le 25 Avr 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 commentaires
Md. Mohidul Islam
Md. Mohidul Islam le 25 Avr 2022
It's running on mobile apps but showing the mistake in the computer
Torsten
Torsten le 25 Avr 2022
The corrected code above works for me.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by