You can simply copy and paste this function to the folder you keep your function m-files.
Insertion Sort is of n^2 order and performs well for up to 10,000 inputs.
Examples of how you can use this function include, but aren't limited to:
plot(floor(100 * rand(1,100))); hold on;
plot(insertion_sort(floor(100 * rand(1,100))),'r');
The most important improvement would be a documentation: The first comment section after the "function ..." line is displayed by the "help" command. Without a documentation, which explains e.g. the type and dimensions of inputs and outputs as well as the applied procedure, a function is not usable, although it might be useful.
Look at Matlab's toolbox functions to learn more about the usual documentation style, e.g. the "H1-line".