With a matrix, when would: your outer loop be over the rows your outer loop be over the columns it not matter which is the outer and which is the inner loop?
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:5| Question number:14.5
All Answers
total answers (1)
The outer loop must be over the rows if you want to perform an action for every row; it must be over the columns if you want to perform an action for every column. It does not matter if you simply need to refer to every element in the matrix.
need an explanation for this answer? contact us directly to get an explanation for this answer