how to input values in a 2D matrix using a nested for loop of size 5*5?

2 vues (au cours des 30 derniers jours)
chan
chan le 3 Déc 2015
Modifié(e) : Thorsten le 3 Déc 2015
how to input values in a 2-D matrix using a nested for loop of size 5*5?

Réponse acceptée

Thorsten
Thorsten le 3 Déc 2015
Modifié(e) : Thorsten le 3 Déc 2015
for i = 1:5
for j = 1:5
A(i,j) = input(sprintf('please enter value (%d, %d) >> ', i, j))
end
end

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements 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