Test Performance Using Scripts or Functions
This example shows how to create a script or function-based performance test that times
the preallocation of a vector using four different approaches.
Write Performance Test
Create a performance test in a file, preallocationTest.m, in your current working
folder. In this example, you can choose to use either the following script-based test or the
function-based test. The output in this example is for the function-based test. If you use
the script-based test, then your test names will be different.
Test Performance Using Scripts or Functions