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

 Accepted Answer

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

Asked:

on 3 Dec 2015

Edited:

on 3 Dec 2015

Community Treasure Hunt

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

Start Hunting!