Xlabel and ylabel

In Win7, Matlab 2010a environment, I do not seem to be able to save figures as tikz when using xlabel and ylabel. Title works though.

The error message is.

*** ??? Error using ==> sprintf
Function is not defined for 'cell' inputs.

Error in ==> matlab2tikz>drawAxes at 596
xlabelText = sprintf( '%s', axisLabels.x );

Error in ==> matlab2tikz>saveToFile at 275
[m2t,env] = drawAxes( m2t, visibleAxesHandles(ix(k)),
alignmentOptions(ix(k)) );

Error in ==> matlab2tikz at 199
saveToFile( m2t, fid, fileWasOpen );

>>

I can confirm this.

Change the following lines in the file matlab2tikz.m:

Replace
xlabelText = sprintf( '%s', axisLabels.x );
by
xlabelText = sprintf( '%s', axisLabels.x{:} );
and
ylabelText = sprintf( '%s', axisLabels.y );
by
ylabelText = sprintf( '%s', axisLabels.y{:} );

Addthis