Warning: Unable to interpret TeX string

4 ビュー (過去 30 日間)
John
John 2015 年 1 月 15 日
回答済み: Star Strider 2015 年 1 月 15 日
The error shows up when using this:
306 saveas(gcf,save_jpg);
Warning: Unable to interpret TeX string "M:\Data\D201412"
> In graphics\private\prepare at 44
In print>LocalPrint at 262
In print at 231
In saveas at 169
In analyze_data at 306
It works fine to save files into sub-folder "folder1/folder2/..." etc, But to access up folders "\" has to be used, such as:
path(path,'C:\Users\user1\Documents\Matlab\library')
foldername = "M:\Data\D201412";
This appears.

回答 (1 件)

Star Strider
Star Strider 2015 年 1 月 15 日
The backslant (\) character is a control character in TeX. If you want to have it display correctly, you need to use the double-backslant (\\) to display a single backslant correctly.
Esample:
figure(1)
scatter(rand(50,1), rand(50,1), '+')
title('M:\\Data\\D201412','Interpreter','tex')
The double-quote (") could be a problem as well. If you want to include those, you have to enclose them as part of the string, in single quotes:
'"M:\Data\D201412"'

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by