I recently installed MATLAB R2012b on a Windows desktop in my office. The plan was to set up a piece of code to run for quite a while on that machine. My office is cool (for maximum computer happiness) and ,over the break, the machine would be undisturbed.
Alternative Perl Install for MATLAB
I had an alternative Perl install for MATLAB named Strawberry Perl (which seems to work well for me) since a piece of software I use requires a call to a Perl function. I had even ran a variant of my main code in Octave (an open-source variant of MATLAB). Apparently beginning with R2008b, Mathworks ships MATLAB with a stripped-down version of Perl (ActivePerl). Consequently, even though Octave liked Strawberry, MATLAB did not. How could I make it work with my piece of code?
Why didn’t ActivePerl (built into MATLAB) work well for me? I required the Math::Random package. I was able to navigate through the C:Program FilesMATLABr2012B…. subdirectory structure to find the same directory that included Perl and (most importantly) the PPM (or the Perl Package Manager). I was able to install that file, but still couldn’t get my code to run.
Finally, I stumbled across this link that hinted at needing Strawberry Perl’s place in the Windows Path (I had forgotten about paths) to be before MATLAB’s place. Then, everything worked. Don’t forget to use semi-colons to separate entries in your path.