Improved solution to the random number problem in matlab_tutorial #2


A code that uses the find command rather than a for-loop to answer the random number problem in a sector, discussed in matlab_tutorial #2, is given in sector.m

This code is far more efficient than the looping solution and illustrates the principle that loops should be avoided in MATLAB if possible.


Copyright © University of Sydney 2011