An interactive introduction to MATLAB

(Jeff_L) #1

64 loops



  • On Line 20 the summation is performed, and on Line 21 the loop counter
    is incremented.


Which loop to use: for or while?
Well it depends on the problem! Several of the code listings in this chapter
have demonstrated that the same problem can be solved using either aforor
whileloop.
Free download pdf