Why do I receive an error with the DATENUM function when exporting PNG-files from MATLAB 7.0 (R14)?

1 view (last 30 days)
If I attempt to export a PNG-file with the following code:
figure;
plot( 1:1:10, 1:1:10, 'ro--' ); grid on; hold on;
print( '-dpng', 'Testplot.png' );
I receive the following error:
??? Error using ==> print
Error using ==> print
DATENUM failed.
Failed to parse date string.
Error using ==> datevec
Failed to lookup month of year.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, read below for any possible workarounds:
There is a bug in MATLAB 7.0 (R14) in the way that the DATENUM function handles extended ASCII characters, such as those appearing in certain month names in languages other than English.
To work around this issue, try exporting to a different file format.

More Answers (0)

Categories

Find more on Dates and Time in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!