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

6 Ansichten (letzte 30 Tage)
how to input values in a 2-D matrix using a nested for loop of size 5*5?

Akzeptierte Antwort

Thorsten
Thorsten am 3 Dez. 2015
Bearbeitet: Thorsten am 3 Dez. 2015
for i = 1:5
for j = 1:5
A(i,j) = input(sprintf('please enter value (%d, %d) >> ', i, j))
end
end

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements 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