class="codeinput"><span class="keyword">function</span> elasticDistortionsDemo()
</pre><h2>Illustrate elastic deformations<a name="2"></a></h2><pre class="codeinput"><span class="comment">%PMTKauthor Kevin Swersky</span>

<span class="comment">%load goodsix.mat</span>
loadData(<span class="string">'pmtkImages'</span>, <span class="string">'isMatFile'</span>, false)
I = imread(<span class="string">'digit6.png'</span>);

setSeed(2);
<span class="comment">%rand('seed',30);</span>
cm = ones(64,3);
cm(:,1:2) = r