Stuart’s MATLAB Videos

Watch and Learn

Naive vs Complex solutions

Posted by Doug Hull,

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.

0 views (last 30 days)  | |


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.