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

6 views (last 30 days)
how to input values in a 2-D matrix using a nested for loop of size 5*5?

Accepted Answer

Thorsten
Thorsten on 3 Dec 2015
Edited: Thorsten on 3 Dec 2015
for i = 1:5
for j = 1:5
A(i,j) = input(sprintf('please enter value (%d, %d) >> ', i, j))
end
end

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!