Stuart’s MATLAB Videos

Watch and Learn

Naive vs Complex solutions

This video is more philosophical than about MATLAB syntax. When trying to understand the cycles that occur in the output of a pseudo random number generator, I first approached the problem in easiest way I could think of. It worked well enough for small datasets, but because the computational order of complexity grew by N^2, this did not work very well. It took someone pointing out an algorithm that grew linearly with N to complete the job.

This kind of algorithmic innovation is needed in many cases because the profiler can help you on a line by line basis, but it can not find systematic problems like this.

  • print


要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。